/* mapzoom.js 1.4 (27-Sep-2012) (c) by Christian Effenberger. All Rights Reserved. Source: mapzoom.netzgesta.de. Distributed under Netzgestade Software License Agreement. Read more at... http://www.netzgesta.de/cvi/LICENSE.html */
var cvi_mzclback, cvi_mztimer, cvi_mzactive, cvi_mzimage = null,
    mapzoom = {
        _mapzoom: null,
        version: 1.4,
        released: '2012-09-27 18:56:00',
        defaultFading: false,
        defaultButtons: true,
        defaultOverview: true,
        defaultNozoom: false,
        defaultWheelinvert: false,
        defaultWheelstep: 20,
        defaultIcons: null,
        defaultBicubic: false,
        defaultCallback: null,
        defaultForcetouchui: false,
        defaultShowcoords: false,
        defaultPixelcoords: true,
        defaultRelativecoords: false,
        defaultPercentcoords: false,
        defaultLowres: '',
        defaultMillisec: 40,
        defaultCoordbox: [90, -180, -90, 180],
        defaultOpacity: 90,
        defaultOvsfact: 25,
        defaultOvaopac: 75,
        defaultOvacolor: 'red',
        defaultOvbcolor: 'white',
        defaultVaopac: 70,
        defaultVbopac: 100,
        defaultVbcolor: '#ff0042',
        defaultVacolor: '#ede377',
        defaultVnborder: false,
        defaultVafading: false,
        defaultVbwidth: 80,
        defaultIntitle: 'click or press shift key to zoom in',
        defaultOuttitle: 'click or press alt key to zoom out',
        defaultPvaopac: 33,
        defaultPvbopac: 66,
        defaultPvbcolor: '#808080',
        defaultPvacolor: '#ffffff',
        defaultOvborder: '',
        defaultCurpath: '',
        defaultZoom: 0,
        defaultXpos: 50,
        defaultYpos: 50,
        defaultInfoblock: '<dl><div align="right">Mouseover <big>Keyboard Support<\/big><\/div><dt>Zoom in:<\/dt><dd>[+] / [PgDn] / [End] <em>(is faster)<\/em> /<br \/> [shift] + <u>left</u> mouse button /<br \/> double click + <u>left</u> mouse button /<br \/><u>middle</u> / <u>wheel</u> mouse button /<br \/>mouse wheel <u>down</u><small><br \/><br \/><\/small><\/dd><dt>Zoom out:<\/dt><dd>[–] / [PgUp] / [Home] <em>(is faster)<\/em> /<br \/> [alt] + <u>left</u> mouse button /<br \/><u>right</u> mouse button /<br \/>mouse wheel <u>up</u><small><br \/><br \/><\/small><\/dd><dt>Pan / Shift / Move:<\/dt><dd>[left] / [right] / [down] / [up] arrow buttons<br \/>+ [shift] <em>(is faster)</em> and + [alt] <em>(is slower)<\/em><\/dd><\/dl>',
        gif: "",
        add: function (ele, opts) {
            function vml() {
                var vs = false;
                if (document.all && document.namespaces && !window.opera) {
                    var a = document.body.appendChild(document.createElement('div'));
                    a.innerHTML = '<v:shape id="vml_flag1" adj="1" />';
                    var b = a.firstChild;
                    b.style.behavior = "url(#default#VML)";
                    vs = b ? typeof b.adj == "object" : true;
                    a.parentNode.removeChild(a)
                }
                return vs
            };

            function svg() {
                return Boolean(window.SVGAngle || document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") || (!!document.createElementNS && !!document.createElementNS('http://www.w3.org/2000/svg', "svg").createSVGRect))
            };

            function getEBName(t, n) {
                var i, m = 0,
                    a = document.getElementsByTagName(t.toUpperCase()) || new Array();
                for (i = 0; i < a.length; i++) {
                    m = a[i].getAttribute("name");
                    if (m == n) {
                        m = a[i];
                        break
                    }
                }
                return m
            };

            function roundTo(val, dig) {
                var num = val;
                if (val > 8191 && val < 10485) {
                    val = val - 5000;
                    num = Math.round(val * Math.pow(10, dig)) / Math.pow(10, dig);
                    num = num + 5000
                } else {
                    num = Math.round(val * Math.pow(10, dig)) / Math.pow(10, dig)
                }
                return num
            };

            function uniqueID() {
                var val = Date.parse(new Date()) + Math.floor(Math.random() * 100000000000);
                return val.toString(16)
            };

            function boxShadow() {
                var bs = false,
                    mbs = false,
                    kbs = false,
                    wbs = false;
                try {
                    bs = (document.body.style.boxShadow !== undefined)
                } catch (e) {}
                try {
                    mbs = (document.body.style.MozBoxShadow !== undefined)
                } catch (e) {}
                try {
                    kbs = (document.body.style.KhtmlBoxShadow !== undefined)
                } catch (e) {}
                try {
                    wbs = (document.body.style.WebkitBoxShadow !== undefined)
                } catch (e) {}
                return (bs || mbs || kbs || wbs ? true : false)
            };
            if (!ele.active) {
                ele.style.visibility = "hidden";
                var defopts = {
                    "callback": mapzoom.defaultCallback,
                    "curpath": mapzoom.defaultCurpath,
                    "opacity": mapzoom.defaultOpacity,
                    "millisec": mapzoom.defaultMillisec,
                    "intitle": mapzoom.defaultIntitle,
                    "outtitle": mapzoom.defaultOuttitle,
                    "infoblock": mapzoom.defaultInfoblock,
                    "wheelinvert": mapzoom.defaultWheelinvert,
                    "wheelstep": mapzoom.defaultWheelstep,
                    "pvaopac": mapzoom.defaultPvaopac,
                    "pvbopac": mapzoom.defaultPvbopac,
                    "pvbcolor": mapzoom.defaultPvbcolor,
                    "pvacolor": mapzoom.defaultPvacolor,
                    "vaopac": mapzoom.defaultVaopac,
                    "vbopac": mapzoom.defaultVbopac,
                    "vbcolor": mapzoom.defaultVbcolor,
                    "vacolor": mapzoom.defaultVacolor,
                    "vnborder": mapzoom.defaultVnborder,
                    "vafading": mapzoom.defaultVafading,
                    "vbwidth": mapzoom.defaultVbwidth,
                    "ovsfact": mapzoom.defaultOvsfact,
                    "ovaopac": mapzoom.defaultOvaopac,
                    "ovacolor": mapzoom.defaultOvacolor,
                    "ovbcolor": mapzoom.defaultOvbcolor,
                    "zoom": mapzoom.defaultZoom,
                    "xpos": mapzoom.defaultXpos,
                    "ypos": mapzoom.defaultYpos,
                    "lowres": mapzoom.defaultLowres,
                    "icons": mapzoom.defaultIcons,
                    "bicubic": mapzoom.defaultBicubic,
                    "forcetouchui": mapzoom.defaultForcetouchui
                };
                if (opts) {
                    for (var i in defopts) {
                        if (!opts[i]) {
                            opts[i] = defopts[i]
                        }
                    }
                } else {
                    opts = defopts
                } if (document.images && document.createElement && document.getElementById && document.getElementsByTagName) {
                    var st, tmp, over, view, div = ele.parentNode,
                        img = mapzoom.E('div'),
                        xref = mapzoom.E('img'),
                        outer = mapzoom.E('div'),
                        map, mpn = ele.useMap.split("#");
                    img.xid = (ele.id != "" ? ele.id : ele.id = uniqueID());
                    div.appendChild(outer);
                    outer.id = img.xid + '_wrap';
                    outer.appendChild(xref);
                    outer.appendChild(img);
                    img.wrapid = outer.id;
                    img.opts = defopts;
                    img.highres = ele.src;
                    if (ele.naturalWidth && ele.naturalHeight) {
                        img.xfactor = roundTo(ele.naturalWidth / ele.width, 4);
                        img.yfactor = roundTo(ele.naturalHeight / ele.height, 4);
                        img.maxwidth = ele.naturalWidth;
                        img.maxheight = ele.naturalHeight
                    } else {
                        tmp = new Image;
                        tmp.src = ele.src;
                        img.xfactor = roundTo(tmp.width / ele.width, 4);
                        img.yfactor = roundTo(tmp.height / ele.height, 4);
                        img.maxwidth = tmp.width;
                        img.maxheight = tmp.height
                    } if (ele.width >= 100 && ele.width <= img.maxwidth && ele.height >= 100 && ele.height <= img.maxheight) {
                        img.callback = (typeof opts['callback'] === 'string' ? opts['callback'] : img.opts['callback']);
                        img.fading = (typeof opts['fading'] === 'boolean' ? opts['fading'] : mapzoom.defaultFading);
                        img.buttons = (typeof opts['buttons'] === 'boolean' ? opts['buttons'] : mapzoom.defaultButtons);
                        img.nozoom = (typeof opts['nozoom'] === 'boolean' ? opts['nozoom'] : mapzoom.defaultNozoom);
                        img.bicubic = (typeof opts['bicubic'] === 'boolean' ? opts['bicubic'] : mapzoom.defaultBicubic);
                        img.overview = (typeof opts['overview'] === 'boolean' ? opts['overview'] : mapzoom.defaultOverview);
                        img.showcoords = (typeof opts['showcoords'] === 'boolean' ? opts['showcoords'] : mapzoom.defaultShowcoords);
                        img.relativecoords = (typeof opts['relativecoords'] === 'boolean' ? opts['relativecoords'] : mapzoom.defaultRelativecoords);
                        img.pixelcoords = (typeof opts['pixelcoords'] === 'boolean' ? opts['pixelcoords'] : mapzoom.defaultPixelcoords);
                        img.percentcoords = (typeof opts['percentcoords'] === 'boolean' ? opts['percentcoords'] : mapzoom.defaultPercentcoords);
                        img.forcetouchui = (typeof opts['forcetouchui'] === 'boolean' ? opts['forcetouchui'] : mapzoom.defaultForcetouchui);
                        img.invert = (typeof opts['wheelinvert'] === 'boolean' ? opts['wheelinvert'] : mapzoom.defaultWheelinvert);
                        img.lowres = (typeof opts['lowres'] === 'string' ? opts['lowres'] : img.opts['lowres']);
                        img.icons = (typeof opts['icons'] === 'object' ? opts['icons'] : img.opts['icons']);
                        img.bicubic = (img.bicubic ? "bicubic" : "nearest-neighbor");
                        img.curpath = (typeof opts['curpath'] === 'string' ? opts['curpath'] : img.opts['curpath']);
                        img.intitle = (typeof opts['intitle'] === 'string' ? opts['intitle'] : img.opts['intitle']);
                        img.outtitle = (typeof opts['outtitle'] === 'string' ? opts['outtitle'] : img.opts['outtitle']);
                        img.infoblock = (typeof opts['infoblock'] === 'string' ? opts['infoblock'] : img.opts['infoblock']);
                        img.defblock = img.infoblock;
                        img.pvaopac = (typeof opts['pvaopac'] === 'number' ? parseInt(Math.min(Math.max(0, opts['pvaopac']), 100)) : img.opts['pvaopac']) / 100;
                        img.pvbopac = (typeof opts['pvbopac'] === 'number' ? parseInt(Math.min(Math.max(0, opts['pvbopac']), 100)) : img.opts['pvbopac']) / 100;
                        img.pvacolor = (typeof opts['pvacolor'] === 'string' ? opts['pvacolor'] : img.opts['pvacolor']);
                        img.pvbcolor = (typeof opts['pvbcolor'] === 'string' ? opts['pvbcolor'] : img.opts['pvbcolor']);
                        img.vbw = (typeof opts['vbwidth'] === 'number' ? parseInt(Math.min(Math.max(20, opts['vbwidth']), 100)) : img.opts['vbwidth']) / 1000;
                        img.vaopac = (typeof opts['vaopac'] === 'number' ? parseInt(Math.min(Math.max(0, opts['vaopac']), 100)) : img.opts['vaopac']) / 100;
                        img.vbopac = (typeof opts['vbopac'] === 'number' ? parseInt(Math.min(Math.max(0, opts['vbopac']), 100)) : img.opts['vbopac']) / 100;
                        img.vacolor = (typeof opts['vacolor'] === 'string' ? opts['vacolor'] : img.opts['vacolor']);
                        img.vbcolor = (typeof opts['vbcolor'] === 'string' ? opts['vbcolor'] : img.opts['vbcolor']);
                        img.vnborder = (typeof opts['vnborder'] === 'boolean' ? opts['vnborder'] : mapzoom.defaultVnborder);
                        img.vafading = (typeof opts['vafading'] === 'boolean' ? opts['vafading'] : mapzoom.defaultVafading);
                        img.ovacolor = (typeof opts['ovacolor'] === 'string' ? opts['ovacolor'] : img.opts['ovacolor']);
                        img.ovbcolor = (typeof opts['ovbcolor'] === 'string' ? opts['ovbcolor'] : img.opts['ovbcolor']);
                        img.cbox = (typeof opts['coordbox'] === 'object' ? opts['coordbox'] : [90, -180, -90, 180]);
                        img.cby = parseFloat(Math.min(Math.max(-90, img.cbox[0]), 90));
                        img.cbx = parseFloat(Math.min(Math.max(-180, img.cbox[1]), 180));
                        img.cbh = Math.abs(parseFloat(Math.min(Math.max(-90, img.cbox[2]), 90))) + Math.abs(parseFloat(Math.min(Math.max(-90, img.cbox[0]), 90)));
                        img.cbw = Math.abs(parseFloat(Math.min(Math.max(-180, img.cbox[3]), 180))) + Math.abs(parseFloat(Math.min(Math.max(-180, img.cbox[1]), 180)));
                        img.chf = (180 / img.cbh);
                        img.cwf = (360 / img.cbw);
                        img.cyf = 1 - ((90 + img.cby) / 180);
                        img.cxf = (180 + img.cbx) / 360;
                        img.speed = (typeof opts['wheelstep'] === 'number' ? parseInt(Math.min(Math.max(5, opts['wheelstep']), 100)) : img.opts['wheelstep']);
                        img.ovsfact = (typeof opts['ovsfact'] === 'number' ? parseInt(Math.min(Math.max(10, opts['ovsfact']), 50)) : img.opts['ovsfact']) / 100;
                        img.millisec = (typeof opts['millisec'] === 'number' ? parseInt(Math.min(Math.max(5, opts['millisec']), 100)) : img.opts['millisec']);
                        img.ovaopac = (typeof opts['ovaopac'] === 'number' ? parseInt(Math.min(Math.max(0, opts['ovaopac']), 100)) : img.opts['ovaopac']);
                        img.opacity = (typeof opts['opacity'] === 'number' ? parseInt(Math.min(Math.max(0, opts['opacity']), 100)) : img.opts['opacity']);
                        img.ovborder = (typeof opts['ovborder'] === 'number' ? parseInt(Math.min(Math.max(0, opts['ovborder']), 20)) : Math.min(Math.round(ele.width / 100), Math.round(ele.height / 100)));
                        img.zoom = (typeof opts['zoom'] === 'number' ? parseFloat(Math.min(Math.max(0, opts['zoom']), 100)) : img.opts['zoom']);
                        img.xpos = (typeof opts['xpos'] === 'number' ? parseFloat(Math.min(Math.max(0, opts['xpos']), 100)) : img.opts['xpos']);
                        img.ypos = (typeof opts['ypos'] === 'number' ? parseFloat(Math.min(Math.max(0, opts['ypos']), 100)) : img.opts['ypos']);
                        img.opts = null;
                        defopts = null;
                        img.bc = "1px white solid";
                        img.dc = "1px gray solid";
                        img.automode = false;
                        img.autoloop = false;
                        img.autowait = 0;
                        img.zoomin = false;
                        img.zoomout = false;
                        st = ele.parentNode.style;
                        st.position = (st.position == 'static' || st.position == '' ? 'relative' : st.position);
                        st.height = ele.height + 'px';
                        st.width = ele.width + 'px';
                        st.padding = '0px';
                        st.overflow = 'hidden';
                        st.MozUserSelect = st.KhtmlUserSelect = "none";
                        ele.parentNode.unselectable = "on";
                        st.border = "none";
                        outer.left = 0;
                        outer.top = 0;
                        outer.width = ele.width;
                        outer.height = ele.height;
                        outer.unselectable = "on";
                        st = outer.style;
                        st.MozUserSelect = st.KhtmlUserSelect = "none";
                        st.visibility = "hidden";
                        st.display = "block";
                        st.position = "absolute";
                        st.left = '0px';
                        st.top = '0px';
                        st.width = ele.width + 'px';
                        st.height = ele.height + 'px';
                        xref.id = img.xid + '_img';
                        xref.src = ele.src;
                        st = xref.style;
                        st.msInterpolationMode = img.bicubic;
                        st.position = "absolute";
                        st.left = '0px';
                        st.top = '0px';
                        st.width = '100%';
                        st.height = '100%';
                        img.xrefid = xref.id;
                        img.unselectable = "on";
                        st = img.style;
                        st.MozUserSelect = st.KhtmlUserSelect = st.WebkitTouchCallout = "none";
                        st.display = "block";
                        st.position = "relative";
                        if (document.all && !window.opera && (!document.documentMode || document.documentMode < 9)) {
                            st.background = "url('" + img.curpath + "nop.gif') transparent"
                        }
                        if (document.all && document.documentMode && document.documentMode >= 9) {
                            st.background = "url(" + mapzoom.gif + ") transparent"
                        }
                        st.left = '0px';
                        st.top = '0px';
                        st.width = '100%';
                        st.height = '100%';
                        st.cursor = "pointer";
                        img.pointer = st.cursor;
                        img.minwidth = outer.width;
                        img.hasmoved = false;
                        img.lasttap = 0;
                        img.dsh = [{
                            n: 0,
                            d: 'solid',
                            a: [0],
                            r: [0]
                        }, {
                            n: 1,
                            d: 'shortdot',
                            a: [1, 1],
                            r: [0, 2]
                        }, {
                            n: 2,
                            d: 'dot',
                            a: [1, 3],
                            r: [0, 4]
                        }, {
                            n: 3,
                            d: 'shortdash',
                            a: [3, 1],
                            r: [2, 2]
                        }, {
                            n: 4,
                            d: 'dash',
                            a: [4, 3],
                            r: [3, 4]
                        }, {
                            n: 5,
                            d: 'longdash',
                            a: [8, 3],
                            r: [7, 4]
                        }, {
                            n: 6,
                            d: 'shortdashdot',
                            a: [3, 1, 1, 1],
                            r: [2, 2, 0, 2]
                        }, {
                            n: 7,
                            d: 'dashdot',
                            a: [4, 3, 1, 3],
                            r: [3, 4, 0, 4]
                        }, {
                            n: 8,
                            d: 'longdashdot',
                            a: [8, 3, 1, 3],
                            r: [7, 4, 0, 4]
                        }, {
                            n: 9,
                            d: 'shortdashdotdot',
                            a: [3, 1, 1, 1, 1, 1],
                            r: [2, 2, 0, 2, 0, 2]
                        }, {
                            n: 10,
                            d: 'longdashdotdot',
                            a: [8, 3, 1, 3, 1, 3],
                            r: [7, 4, 0, 4, 0, 4]
                        }];
                        img.plo = [];
                        img.minheight = outer.height;
                        img.maxleft = img.maxwidth - img.minwidth;
                        img.maxtop = img.maxheight - img.minheight;
                        ele.id = "";
                        outer.parentNode.removeChild(ele);
                        img.id = img.xid;
                        img.aos = navigator.userAgent.match(/android/i);
                        img.ios = navigator.platform.match(/iPad|iPhone|iPod/i);
                        img.stg = typeof (document.ontouchstart) != "undefined" ? true : false;
                        img.mtg = typeof (document.ongesturestart) != "undefined" ? true : false;
                        img.tod = img.stg && (img.ios || img.aos || img.forcetouchui) ? true : false;
                        if (img.tod) {
                            img.buttons = false;
                            img.showcoords = false
                        }
                        img.trident = document.all && !window.opera && (!document.documentMode || document.documentMode < 9) ? 1 : 0;
                        img.chakra = document.all && document.documentMode && document.documentMode >= 9 ? 1 : 0;
                        img.notrans = img.trident && !window.XMLHttpRequest ? 1 : 0;
                        img.vmlbug = document.all && document.documentMode && document.documentMode == 8 ? 1 : 0;
                        if (img.fading) {
                            if (img.trident) {
                                outer.style.filter = "alpha(opacity=0)"
                            } else {
                                outer.style.opacity = 0
                            }
                        }
                        outer.style.visibility = 'visible';
                        img.svgbug = document.contentType;
                        img.webkit = window.atob != undefined && !window.updateCommands && !window.opera ? 1 : 0;
                        img.divbug = !img.webkit && navigator.userAgent.indexOf('WebKit') > -1 ? 1 : 0;
                        img.gecko = navigator.userAgent.indexOf('Gecko') > -1 && window.updateCommands && !window.opera ? 1 : 0;
                        img.presto = window.opera ? 1 : 0;
                        img.bshadow = boxShadow();
                        img.bmode = (img.trident && (document.compatMode == 'BackCompat' || document.compatMode == 'QuirksMode') ? true : false);
                        img.active = true;
                        img.tip = typeof (cvi_tip) != "object" ? false : true;
                        if (mpn && mpn.length > 1 && mpn[1] != '' && mpn[1].length >= 1) {
                            mpn = mpn[1];
                            if (typeof (map) !== 'object') {
                                map = img.trident && !img.notrans && !img.chakra ? getEBName("map", mpn) : document.getElementsByName(mpn)[0] || document.getElementById(mpn)
                            }
                            img.map = map;
                            img.mapname = mpn;
                            img.mousescript = "";
                            img.vml = vml();
                            img.svg = svg() && (window.postMessage || img.chakra || document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Font", "1.1")) ? true : false
                        }
                        if (img.map && (img.svg || img.vml)) {
                            function gX(v) {
                                var t = img.xfactor * parseFloat(v);
                                return isNaN(t) ? 0 : Math.max(t, 0)
                            };

                            function gY(v) {
                                var t = img.yfactor * parseFloat(v);
                                return isNaN(t) ? 0 : Math.max(t, 0)
                            };

                            function vX(v) {
                                var t = parseInt(img.xfactor * v * 10, 10);
                                return isNaN(t) ? 0 : Math.max(t, 0)
                            };

                            function vY(v) {
                                var t = parseInt(img.yfactor * v * 10, 10);
                                return isNaN(t) ? 0 : Math.max(t, 0)
                            };
                            if (img.svg) {
                                img.svgns = 'http://www.w3.org/2000/svg';
                                tmp = document.createElementNS(img.svgns, "svg");
                                tmp.setAttribute("version", "1.1");
                                tmp.setAttribute("id", img.xid + "_svg");
                                tmp.setAttribute("width", "100%");
                                tmp.setAttribute("height", "100%");
                                tmp.setAttribute("viewBox", "0 0 " + img.maxwidth + " " + img.maxheight);
                                img.appendChild(tmp);
                                var i, j, f, p, b, t, v, q, r, l, k, u;
                                ele = "";
                                for (j = 0; j < map.areas.length; j++) {
                                    st = map.areas[j];
                                    ele = "";
                                    if (st.id == null || st.id == '') {
                                        st.id = img.mapname + '_' + j
                                    }
                                    if (st.coords != '') {
                                        p = "";
                                        v = img.chakra ? st.getAttribute("coords").split(',') : st.coords.split(',');
                                        r = null;
                                        r = st.getAttribute('rel') || st.rel;
                                        q = null;
                                        q = st.getAttribute('rev') || st.rev;
                                        l = st.className.toLowerCase();
                                        u = l.split(" ");
                                        if (st.shape.toLowerCase() == 'rect') {
                                            ele = tmp.ownerDocument.createElementNS(img.svgns, "rect");
                                            ele.setAttribute("x", gX(v[0]));
                                            ele.setAttribute("y", gY(v[1]));
                                            ele.setAttribute("width", gX(v[2] - v[0]));
                                            ele.setAttribute("height", gY(v[3] - v[1]));
                                            ele.shapeform = "rect"
                                        } else if (st.shape.toLowerCase() == 'circle') {
                                            ele = tmp.ownerDocument.createElementNS(img.svgns, "circle");
                                            ele.setAttribute("cx", gX(v[0]));
                                            ele.setAttribute("cy", gY(v[1]));
                                            ele.setAttribute("r", gX(v[2]));
                                            ele.shapeform = "circle"
                                        } else {
                                            if (q != null) {
                                                b = q.split(",");
                                                if (b && b.length > 0) {
                                                    var sel, m, z;
                                                    p += 'M ' + gX(v[0]) + ' ' + gY(v[1]) + ' L ';
                                                    for (i = 2; i < v.length; i += 2) {
                                                        p += gX(v[i]) + ' ' + gY(v[i + 1]) + ' '
                                                    }
                                                    p += 'z ';
                                                    for (k = 0; k < b.length; k++) {
                                                        sel = document.getElementById(b[k]);
                                                        z = null;
                                                        z = sel.coords.split(',');
                                                        if (sel.shape.toLowerCase() == "rect") {
                                                            p += 'M ' + gX(z[0]) + ' ' + gY(z[1]) + ' L ' + gX(z[0]) + ' ' + gY(z[3]) + ' ' + gX(z[2]) + ' ' + gY(z[3]) + ' ' + gX(z[2]) + ' ' + gY(z[1]) + ' z '
                                                        } else if (sel.shape.toLowerCase() == "circle") {
                                                            m = gX(z[2]);
                                                            p += 'M ' + gX(z[0] - z[2]) + ' ' + gY(z[1]) + ' c 0,' + m + ' ' + m + ',' + m + ' ' + m + ',' + m + ' c ' + m + ',0 ' + m + ',-' + m + ' ' + m + ',-' + m + ' c 0,-' + m + ' -' + m + ',-' + m + ' -' + m + ',-' + m + ' c -' + m + ',0 -' + m + ',' + m + ' -' + m + ',' + m + ' z '
                                                        } else {
                                                            p += 'M ' + gX(z[0]) + ' ' + gY(z[1]) + ' L ';
                                                            for (i = 2; i < z.length; i += 2) {
                                                                p += gX(z[i]) + ' ' + gY(z[i + 1]) + ' '
                                                            }
                                                            p += 'Z '
                                                        }
                                                    }
                                                    ele = tmp.ownerDocument.createElementNS(img.svgns, "path");
                                                    ele.setAttribute("fill-rule", "evenodd");
                                                    ele.setAttribute("d", p);
                                                    ele.bother = b
                                                }
                                            } else {
                                                for (i = 0; i < v.length; i += 2) {
                                                    p += gX(v[i]) + ' ' + gY(v[i + 1]) + ' '
                                                }
                                                ele = tmp.ownerDocument.createElementNS(img.svgns, "polygon");
                                                ele.setAttribute("points", p)
                                            }
                                        } if (ele) {
                                            if (r != null) {
                                                ele.other = r.split(",")
                                            }
                                            if (typeof (st.href) == "string") {
                                                mapzoom.P(ele, st)
                                            }
                                            ele.fading = img.vafading;
                                            ele.sys = "svg";
                                            ele.vbw = img.vbw;
                                            ele.forcegroup = l.indexOf('forcegroup') != -1 ? mapzoom.gA(u, "forcegroup") : false;
                                            ele.noborder = l.indexOf('noborder') != -1 ? mapzoom.gA(u, "noborder") : img.vnborder;
                                            ele.specified = l.indexOf('specified') != -1 ? mapzoom.gA(u, "specified") : false;
                                            ele.vbopac = l.indexOf('vbopacity') != -1 ? mapzoom.gV(u, "vbopacity") / 100 : img.vbopac;
                                            ele.vaopac = l.indexOf('vaopacity') != -1 ? mapzoom.gV(u, "vaopacity") / 100 : img.vaopac;
                                            ele.vbcolor = l.indexOf('vbcolor') != -1 ? mapzoom.gC(u, "vbcolor", img.vbcolor) : img.vbcolor;
                                            ele.vacolor = l.indexOf('vacolor') != -1 ? mapzoom.gC(u, "vacolor", img.vacolor) : img.vacolor;
                                            if (ele.specified) {
                                                ele.pbopac = l.indexOf('pbopacity') != -1 ? mapzoom.gV(u, "pbopacity") / 100 : img.pvbopac;
                                                ele.paopac = l.indexOf('paopacity') != -1 ? mapzoom.gV(u, "paopacity") / 100 : img.pvaopac;
                                                ele.pbcolor = l.indexOf('pbcolor') != -1 ? mapzoom.gC(u, "pbcolor", img.pvbcolor) : img.pvbcolor;
                                                ele.pacolor = l.indexOf('pacolor') != -1 ? mapzoom.gC(u, "pacolor", img.pvacolor) : img.pvacolor;
                                                ele.setAttribute("style", "stroke-width:" + (ele.noborder ? 0 : ele.vbw) + "%;stroke:" + ele.pbcolor + ";stroke-opacity:" + ele.pbopac + ";fill:" + ele.pacolor + ";fill-opacity:" + ele.paopac + ";")
                                            } else {
                                                ele.setAttribute("style", "stroke-width:" + (ele.noborder ? 0 : ele.vbw) + "%;stroke:" + ele.vbcolor + ";stroke-opacity:0;fill:" + ele.vacolor + ";fill-opacity:0;")
                                            }
                                            ele.setAttribute("id", st.id);
                                            ele.setAttribute('data-id',st.getAttribute('data-id'));
                                            ele.setAttribute('onclick',st.getAttribute('onclick'));
                                            if (img.tod) {
                                                ele.ontouchstart = function () {
                                                    mapzoom._onSVGOver(this)
                                                };
                                                ele.ontouchend = function () {
                                                    mapzoom._onSVGOut(this)
                                                };
                                                if (img.tip && st.getAttribute("tooltip")) {
                                                    ele.setAttribute("tooltip", st.getAttribute("tooltip"));
                                                    mapzoom.A(ele, "touchstart", cvi_tip._show);
                                                    mapzoom.A(ele, "touchend", cvi_tip._hide)
                                                } else {
                                                    if (st.getAttribute("title")) {
                                                        ele.setAttribute("title", st.getAttribute("title"))
                                                    }
                                                }
                                            } else {
                                                ele.onmouseover = function () {
                                                    mapzoom._onSVGOver(this)
                                                };
                                                ele.onmouseout = function () {
                                                    mapzoom._onSVGOut(this)
                                                };
                                                ele.onmousedown = mapzoom._onVectorDown;
                                                ele.onmouseup = mapzoom._onVectorUp;
                                                if (img.tip && st.getAttribute("tooltip")) {
                                                    ele.setAttribute("tooltip", st.getAttribute("tooltip"));
                                                    mapzoom.A(ele, "mouseover", cvi_tip._show);
                                                    mapzoom.A(ele, "mousemove", cvi_tip._move);
                                                    mapzoom.A(ele, "mouseout", cvi_tip._hide)
                                                } else {
                                                    if (st.getAttribute("title")) {
                                                        ele.setAttribute("title", st.getAttribute("title"))
                                                    }
                                                }
                                            }
                                            tmp.appendChild(ele)
                                        }
                                    }
                                }
                            } else if (img.vml) {
                                tmp = document.createStyleSheet();
                                st = ["shape", "shapetype", "group", "background", "path", "formulas", "handles", "fill", "stroke", "shadow", "textbox", "textpath", "imagedata", "line", "polyline", "curve", "roundrect", "oval", "rect", "arc", "image"];
                                for (var i = 0; i < st.length; i++) {
                                    tmp.addRule("v\\:" + st[i], "behavior: url(#default#VML);")
                                }
                                document.namespaces.add("v", "urn:schemas-microsoft-com:vml");
                                var i, j, b, f, p, t, v, q, r, l, u;
                                ele = "";
                                tmp = mapzoom.E("v:group");
                                tmp.setAttribute("id", img.xid + "_vml");
                                tmp.coordorigin = "0,0";
                                tmp.coordsize = (10 * img.maxwidth) + "," + (10 * img.maxheight);
                                tmp.style.cssText = 'zoom:1;border:0;margin:0;padding:0;display:block;position:absolute;left:0px;top:0px;width:100%;height:100%;';
                                img.appendChild(tmp);
                                if (tmp) {
                                    ele = mapzoom.E("v:rect");
                                    ele.style.cssText = 'zoom:1;border:0;margin:0;padding:0;display:block;position:absolute;left:0px;top:0px;width:' + img.maxwidth + 'px;height:' + img.maxheight + 'px;';
                                    ele.filled = "t";
                                    ele.stroked = "f";
                                    over = mapzoom.E("v:fill");
                                    over.color = ele.acolor;
                                    over.opacity = 0;
                                    ele.appendChild(over);
                                    tmp.appendChild(ele);
                                    for (j = 0; j < map.areas.length; j++) {
                                        st = map.areas[j];
                                        ele = "";
                                        if (st.id == null || st.id == '') {
                                            st.id = img.mapname + '_' + j
                                        }
                                        if (st.coords != '' && st.shape.match(/rect|circle|polygon|poly/i)) {
                                            p = "";
                                            v = st.coords.split(',');
                                            r = null;
                                            r = st.getAttribute('rel') || st.rel;
                                            q = null;
                                            q = st.getAttribute('rev') || st.rev;
                                            f = st.href;
                                            l = st.className;
                                            u = l.split(" ");
                                            if (st.shape.toLowerCase() == 'rect') {
                                                ele = mapzoom.E("v:rect");
                                                ele.style.cssText = 'zoom:1;border:0;border:0;margin:0;padding:0;display:block;position:absolute;left:' + vX(v[0]) + 'px;top:' + vY(v[1]) + 'px;width:' + vX(v[2] - v[0]) + 'px;height:' + vY(v[3] - v[1]) + 'px;';
                                                ele.shapeform = "rect"
                                            } else if (st.shape.toLowerCase() == 'circle') {
                                                ele = mapzoom.E("v:oval");
                                                ele.style.cssText = 'zoom:1;border:0;margin:0;padding:0;display:block;position:absolute;left:' + vX(v[0] - v[2]) + 'px;top:' + vY(v[1] - v[2]) + 'px;width:' + (vX(v[2]) * 2) + 'px;height:' + (vY(v[2]) * 2) + 'px;';
                                                ele.shapeform = "circle"
                                            } else {
                                                if (q != null) {
                                                    b = q.split(",");
                                                    if (b && b.length > 0) {
                                                        var sel, m, w, v, z;
                                                        p = "m " + vX(v[0]) + "," + vY(v[1]) + " l ";
                                                        for (i = 2; i < v.length; i += 2) {
                                                            p += vX(v[i]) + ',' + vY(v[i + 1]) + ' '
                                                        }
                                                        p += 'x ';
                                                        for (k = 0; k < b.length; k++) {
                                                            sel = document.getElementById(b[k]);
                                                            z = null;
                                                            z = sel.coords.split(',');
                                                            if (sel.shape.toLowerCase() == "rect") {
                                                                p += 'm ' + vX(z[0]) + ',' + vY(z[1]) + ' l ' + vX(z[0]) + ',' + vY(z[3]) + ',' + vX(z[2]) + ',' + vY(z[3]) + ',' + vX(z[2]) + ',' + vY(z[1]) + ' x '
                                                            } else if (sel.shape.toLowerCase() == "circle") {
                                                                w = vX(z[0]);
                                                                v = vX(z[1]);
                                                                m = vX(z[2]);
                                                                p += 'm ' + (w - m) + ',' + (v - m) + ' ar ' + (w - m) + ',' + (v - m) + ',' + (w + m) + ',' + (v + m) + ',' + (w - m) + ',' + v + ',' + (w - m) + ',' + v + ' x '
                                                            } else {
                                                                p += 'm ' + vX(z[0]) + ',' + vY(z[1]) + ' l ';
                                                                for (i = 2; i < z.length; i += 2) {
                                                                    p += vX(z[i]) + ',' + vY(z[i + 1]) + ' '
                                                                }
                                                                p += 'x '
                                                            }
                                                        }
                                                        p += 'e';
                                                        ele = mapzoom.E("v:shape");
                                                        ele.coordorigin = "0,0";
                                                        ele.coordsize = (10 * img.maxwidth) + "," + (10 * img.maxheight);
                                                        ele.path = p;
                                                        ele.bother = b;
                                                        ele.style.cssText = 'zoom:1;border:0;margin:0;padding:0;display:block;position:absolute;left:0px;top:0px;width:100%;height:100%;'
                                                    }
                                                } else {
                                                    for (i = 2; i < v.length; i += 2) {
                                                        p += vX(v[i]) + ',' + vY(v[i + 1]) + ' '
                                                    }
                                                    ele = mapzoom.E("v:shape");
                                                    ele.coordorigin = "0,0";
                                                    ele.coordsize = (10 * img.maxwidth) + "," + (10 * img.maxheight);
                                                    ele.path = "m " + vX(v[0]) + "," + vY(v[1]) + " l " + p + " e";
                                                    ele.style.cssText = 'zoom:1;border:0;margin:0;padding:0;display:block;position:absolute;left:0px;top:0px;width:100%;height:100%;'
                                                }
                                            } if (r != null) {
                                                ele.other = r.split(",")
                                            }
                                            if (typeof (st.href) == "string") {
                                                mapzoom.P(ele, st)
                                            }
                                            ele.fading = img.vafading;
                                            ele.sys = "vml";
                                            ele.vbw = img.vbw;
                                            ele.forcegroup = l.indexOf('forcegroup') != -1 ? mapzoom.gA(u, "forcegroup") : false;
                                            ele.specified = l.indexOf('specified') != -1 ? mapzoom.gA(u, "specified") : false;
                                            ele.vaopac = l.indexOf('vaopacity') != -1 ? mapzoom.gV(u, "vaopacity") / 100 : img.vaopac;
                                            ele.vacolor = l.indexOf('vacolor') != -1 ? mapzoom.gC(u, "vacolor", img.vacolor) : img.vacolor;
                                            if (ele.specified) {
                                                ele.paopac = l.indexOf('paopacity') != -1 ? mapzoom.gV(u, "paopacity") / 100 : img.pvaopac;
                                                ele.pacolor = l.indexOf('pacolor') != -1 ? mapzoom.gC(u, "pacolor", img.pvacolor) : img.pvacolor
                                            }
                                            ele.setAttribute("id", st.id);
                                            ele.setAttribute("unselectable", "on");
                                            ele.filled = "true";
                                            ele.stroked = "false";
                                            over = mapzoom.E("v:fill");
                                            over.color = ele.specified ? ele.pacolor : ele.vacolor;
                                            over.opacity = ele.specified ? ele.paopac : 0;
                                            ele.appendChild(over);
                                            ele.onmouseover = function () {
                                                mapzoom._onVMLOver(this)
                                            };
                                            ele.onmouseout = function () {
                                                mapzoom._onVMLOut(this)
                                            };
                                            ele.onmousedown = mapzoom._onVectorDown;
                                            ele.onmouseup = mapzoom._onVectorUp;
                                            if (img.tip && st.getAttribute("tooltip")) {
                                                ele.setAttribute("tooltip", st.getAttribute("tooltip"));
                                                mapzoom.A(ele, "mouseover", cvi_tip._show);
                                                mapzoom.A(ele, "mousemove", cvi_tip._move);
                                                mapzoom.A(ele, "mouseout", cvi_tip._hide)
                                            } else {
                                                if (st.getAttribute("title")) {
                                                    ele.setAttribute("title", st.getAttribute("title"))
                                                }
                                            }
                                            tmp.appendChild(ele)
                                        }
                                    }
                                }
                            }
                        }
                        over = mapzoom.E('img');
                        over.src = img.trident ? null : null;
                        over.style.display = 'none';
                        over.id = img.id + '_isrc';
                        div.appendChild(over);
                        img.isrcid = over.id;
                        over = mapzoom.E('div');
                        over.id = img.id + '_xyco';
                        st = over.style;
                        if (img.trident) {
                            st.backgroundColor = 'black'
                        }
                        st.height = 'auto';
                        st.width = 'auto';
                        st.display = 'block';
                        st.position = 'absolute';
                        st.left = '0px';
                        st.bottom = '0px';
                        st.MozUserSelect = st.KhtmlUserSelect = "none";
                        over.unselectable = "on";
                        if (img.fading && img.showcoords || !img.showcoords) {
                            st.visibility = 'hidden'
                        }
                        st.cursor = 'help';
                        div.appendChild(over);
                        img.xycoid = over.id;
                        if (!img.trident) {
                            view = mapzoom.E('div');
                            st = view.style;
                            st.height = '100%';
                            st.width = '100%';
                            st.left = '0px';
                            st.bottom = '0px';
                            st.position = 'absolute';
                            st.backgroundColor = 'black';
                            st.opacity = 0.5;
                            over.appendChild(view)
                        }
                        view = mapzoom.E('div');
                        view.id = img.id + '_cpos';
                        view.innerHTML = "x:0 y:0";
                        view.unselectable = "on";
                        st = view.style;
                        st.textAlign = 'left';
                        st.verticalAlign = 'middle';
                        st.left = '0px';
                        st.bottom = '0px';
                        st.position = 'relative';
                        st.display = 'block';
                        st.color = 'white';
                        st.fontSize = '10px';
                        st.fontFamily = 'Arial, Helvetica, sans-serif';
                        st.fontStyle = 'normal';
                        st.fontWeight = 'bold';
                        st.whiteSpace = 'nowrap';
                        st.padding = '2px 4px';
                        st.textShadow = '0px 0px 4px black';
                        over.appendChild(view);
                        img.cposid = view.id;
                        over = mapzoom.E('div');
                        st = over.style;
                        if (img.fading && img.buttons || !img.buttons) {
                            st.visibility = 'hidden'
                        }
                        over.id = img.id + '_ctrl';
                        st.height = '16px';
                        st.width = '42px';
                        st.display = "block";
                        st.position = 'absolute';
                        st.lineHeight = '1px';
                        st.fontSize = '1px';
                        st.backgroundColor = "#cccccc";
                        if (img.trident) {
                            st.filter = "alpha(opacity=" + img.opacity + ")"
                        } else {
                            st.opacity = img.opacity / 100
                        }
                        st.cursor = 'pointer';
                        st.left = '0px';
                        st.top = '0px';
                        if (img.webkit || img.bshadow) {
                            st.boxShadow = st.MozBoxShadow = st.KhtmlBoxShadow = st.WebkitBoxShadow = "0px 0px 8px black"
                        }
                        div.appendChild(over);
                        img.ctrlid = over.id;
                        view = mapzoom.E('div');
                        st = view.style;
                        st.height = '2px';
                        st.width = '2px';
                        st.position = 'absolute';
                        st.lineHeight = '1px';
                        st.fontSize = '1px';
                        st.left = '4px';
                        st.top = '3px';
                        st.backgroundColor = "black";
                        over.appendChild(view);
                        view = mapzoom.E('div');
                        st = view.style;
                        st.height = '6px';
                        st.width = '2px';
                        st.position = 'absolute';
                        st.lineHeight = '1px';
                        st.fontSize = '1px';
                        st.left = '4px';
                        st.top = '7px';
                        st.backgroundColor = "black";
                        over.appendChild(view);
                        view = mapzoom.E('div');
                        st = view.style;
                        st.height = '2px';
                        st.width = '8px';
                        st.position = 'absolute';
                        st.lineHeight = '1px';
                        st.fontSize = '1px';
                        st.left = '14px';
                        st.top = '7px';
                        st.backgroundColor = "black";
                        over.appendChild(view);
                        view = mapzoom.E('div');
                        st = view.style;
                        st.height = '8px';
                        st.width = '2px';
                        st.position = 'absolute';
                        st.lineHeight = '1px';
                        st.fontSize = '1px';
                        st.left = '17px';
                        st.top = '4px';
                        st.backgroundColor = "black";
                        over.appendChild(view);
                        view = mapzoom.E('div');
                        st = view.style;
                        st.height = '2px';
                        st.width = '8px';
                        st.position = 'absolute';
                        st.lineHeight = '1px';
                        st.fontSize = '1px';
                        st.left = '30px';
                        st.top = '7px';
                        st.backgroundColor = "black";
                        over.appendChild(view);
                        view = mapzoom.E('div');
                        view.id = img.id + '_kbin';
                        st = view.style;
                        st.height = (img.bmode ? 16 : 14) + 'px';
                        st.cursor = 'help';
                        st.width = (img.bmode ? 10 : 8) + 'px';
                        st.display = "block";
                        st.position = 'absolute';
                        st.border = img.bc;
                        st.borderBottom = img.dc;
                        st.borderRight = img.dc;
                        st.left = '0px';
                        st.top = '0px';
                        img.ttipid = img.id + '_ttip';
                        if (img.trident) {
                            view.onmouseover = new Function('mapzoom._showTooltip("' + img.id + '");');
                            view.onmouseout = new Function('mapzoom._killTooltip("' + img.id + '");')
                        } else {
                            view.setAttribute("onmouseover", "mapzoom._showTooltip('" + img.id + "');");
                            view.setAttribute("onmouseout", "mapzoom._killTooltip('" + img.id + "');")
                        }
                        over.appendChild(view);
                        img.kbinid = view.id;
                        view = mapzoom.E('div');
                        view.id = img.id + '_zoin';
                        view.title = img.intitle;
                        st = view.style;
                        st.height = (img.bmode ? 16 : 14) + 'px';
                        st.width = (img.bmode ? 16 : 14) + 'px';
                        st.display = "block";
                        st.position = 'absolute';
                        st.border = img.bc;
                        st.borderBottom = img.dc;
                        st.borderRight = img.dc;
                        st.left = '10px';
                        st.top = '0px';
                        if (img.trident) {
                            view.onclick = new Function('mapzoom._setCursor(this,1,"' + img.id + '");')
                        } else {
                            view.setAttribute("onclick", "mapzoom._setCursor(this,1,'" + img.id + "');")
                        }
                        over.appendChild(view);
                        img.zoinid = view.id;
                        view = mapzoom.E('div');
                        view.id = img.id + '_zout';
                        view.title = img.outtitle;
                        st = view.style;
                        st.height = (img.bmode ? 16 : 14) + 'px';
                        st.width = (img.bmode ? 16 : 14) + 'px';
                        st.display = "block";
                        st.position = 'absolute';
                        st.border = img.bc;
                        st.borderBottom = img.dc;
                        st.borderRight = img.dc;
                        st.left = '26px';
                        st.top = '0px';
                        if (img.trident) {
                            view.onclick = new Function('mapzoom._setCursor(this,0,"' + img.id + '");')
                        } else {
                            view.setAttribute("onclick", "mapzoom._setCursor(this,0,'" + img.id + "');")
                        }
                        over.appendChild(view);
                        img.zoutid = view.id;
                        over = mapzoom.E('div');
                        over.id = img.id + '_info';
                        st = over.style;
                        st.visibility = 'hidden';
                        st.height = '16px';
                        st.width = '7em';
                        st.left = (img.buttons ? '42px' : '0px');
                        st.top = '0px';
                        st.display = "block";
                        st.overflow = 'hidden';
                        st.position = 'absolute';
                        st.lineHeight = '16px';
                        st.fontSize = '10px';
                        st.fontFamily = 'Arial, Helvetica, sans-serif';
                        st.fontStyle = 'normal';
                        st.fontWeight = 'bold';
                        st.textShadow = '0px 0px 4px black';
                        st.color = "#ffffff";
                        if (img.trident) {
                            st.filter = "alpha(opacity=100)"
                        } else {
                            st.opacity = 1
                        }
                        st.cursor = 'default';
                        div.appendChild(over);
                        img.infoid = over.id;
                        view = mapzoom.E('div');
                        st = view.style;
                        st.position = 'absolute';
                        st.height = '16px';
                        st.width = '7em';
                        st.left = '0px';
                        st.top = '0px';
                        st.display = "block";
                        st.backgroundColor = "#000000";
                        if (img.trident) {
                            st.filter = "alpha(opacity=50)"
                        } else {
                            st.opacity = 0.50
                        }
                        over.appendChild(view);
                        view = mapzoom.E('div');
                        view.id = img.id + '_text';
                        st = view.style;
                        st.position = 'absolute';
                        st.height = '16px';
                        st.width = '7em';
                        st.left = '0px';
                        st.top = '0px';
                        st.textAlign = 'center';
                        st.verticalAlign = 'middle';
                        st.overflow = 'hidden';
                        st.display = "block";
                        st.color = "#ffffff";
                        if (img.trident) {
                            st.filter = "alpha(opacity=100)"
                        }
                        over.appendChild(view);
                        img.textid = view.id;
                        view.innerHTML = "100 / " + parseInt(img.xfactor * 100) + " %";
                        over = mapzoom.E('div');
                        over.id = img.id + '_over';
                        st = over.style;
                        st.height = (outer.height * img.ovsfact) + 'px';
                        st.width = (outer.width * img.ovsfact) + 'px';
                        st.display = "block";
                        st.position = 'absolute';
                        st.bottom = '0px';
                        st.right = '0px';
                        st.borderLeft = img.ovborder + 'px solid ' + img.ovbcolor;
                        st.borderTop = img.ovborder + 'px solid ' + img.ovbcolor;
                        if (img.webkit || img.bshadow) {
                            st.borderLeft = '0px solid ' + img.ovbcolor;
                            st.borderTop = '0px solid ' + img.ovbcolor;
                            st.WebkitBoxShadow = st.MozBoxShadow = st.KhtmlBoxShadow = st.boxShadow = "0px 0px 8px black"
                        }
                        st.MozUserSelect = st.KhtmlUserSelect = "none";
                        st.visibility = "hidden";
                        over.unselectable = "on";
                        div.appendChild(over);
                        view = mapzoom.E('img');
                        view.id = img.id + '_tumb';
                        view.src = xref.src;
                        st = view.style;
                        st.height = (outer.height * img.ovsfact) + 'px';
                        st.width = (outer.width * img.ovsfact) + 'px';
                        st.display = "block";
                        st.position = 'absolute';
                        st.bottom = '0px';
                        st.right = '0px';
                        st.msInterpolationMode = img.bicubic;
                        over.appendChild(view);
                        img.tumbid = view.id;
                        if (!img.tod) {
                            view.onmousedown = mapzoom._catchDrag
                        }
                        view = mapzoom.E('div');
                        view.id = img.id + '_view';
                        view.maxleft = 0;
                        view.maxtop = 0;
                        st = view.style;
                        st.lineHeight = '1px';
                        st.fontSize = '1px';
                        st.display = "block";
                        st.position = 'absolute';
                        st.left = '0px';
                        st.top = '0px';
                        st.border = '1px solid ' + img.ovacolor;
                        st.height = parseInt((outer.height * img.ovsfact) - (img.bmode ? 0 : 2)) + 'px';
                        st.width = parseInt((outer.width * img.ovsfact) - (img.bmode ? 0 : 2)) + 'px';
                        if (img.trident) {
                            st.background = "url('" + img.curpath + "nop.gif') transparent";
                            st.filter = "alpha(opacity=" + img.ovaopac + ")"
                        } else {
                            st.opacity = img.ovaopac / 100
                        } if (img.chakra) {
                            st.background = "url(" + mapzoom.gif + ") transparent"
                        }
                        over.appendChild(view);
                        img.overid = over.id;
                        img.viewid = view.id;
                        cvi_mzclback = function () {
                            var img = mapzoom.G(cvi_mzactive);
                            if (img) {
                                mapzoom.G(img.textid).innerHTML = parseInt((img.parentNode.width / img.minwidth) * 100) + " / " + parseInt(img.xfactor * 100) + " %"
                            }
                        };
                        if (img.tod) {
                            img.ontouchstart = mapzoom._catchTouch;
                            if (img.mtg) {
                                img.ongesturestart = mapzoom._catchGesture
                            }
                        } else {
                            view.onmousedown = mapzoom._startMove;
                            img.ondblclick = function () {
                                mapzoom._setCursor(this, (parseFloat((img.parentNode.width - img.minwidth) / (img.maxwidth - img.minwidth)) < 1 ? 1 : 0), img.id, true)
                            };
                            img.oncontextmenu = function () {
                                return false;
                                mapzoom._setCursor(this, 0, img.id, true);
                                return false
                            };
                            img.onmousedown = mapzoom._catchKey;
                            img.onmouseover = mapzoom._catchOver;
                            img.onmouseout = mapzoom._catchOut;
                            if (img.showcoords) {
                                img.mousescript = (img.pixelcoords ? img.relativecoords ? '_showPixel' : '_showCoords' : img.percentcoords ? '_showPercent' : '_showLatLon');
                                img.onmousemove = mapzoom[img.mousescript]
                            }
                        } if (img.zoom > 0 && img.fading && img.overview) {
                            img.overview = false;
                            img.special = true
                        }
                        if (img.zoom > 0) {
                            mapzoom.zooming(img, img.zoom)
                        }
                        if (img.xpos != 50 || img.ypos != 50) {
                            mapzoom.moveto(img, img.xpos + '%', img.ypos + '%')
                        }
                        if (img.icons) {
                            mapzoom.construct(img, img.icons)
                        }
                        if (img.fading) {
                            mapzoom._fadeImage(img.id, 0)
                        }
                        if (img.callback) {
                            if (typeof window[img.callback] === 'function') {
                                try {
                                    window[img.callback]()
                                } catch (err) {
                                    mapzoom.L('error', 'mapzoom: has failed ' + err.message)
                                }
                            }
                        }
                    } else {
                        ele.parentNode.removeChild(outer);
                        ele.style.visibility = 'visible'
                    }
                } else {
                    ele.style.visibility = 'visible'
                }
            }
            return false
        }, remove: function (img, v) {
            if (img && typeof (img.ctrlid) === "string") {
                var ele, obj = img.parentNode.parentNode;
                img.onmousedown = null;
                img.onmousemove = null;
                document.onmousemove = null;
                document.onmouseup = null;
                document.onkeydown = null;
                document.onkeyup = null;
                document.onkeypress = null;
                if (img.gecko) {
                    window.removeEventListener('DOMMouseScroll', mapzoom._catchWheel, false)
                } else {
                    window.onmousewheel = null
                }
                ele = mapzoom.G(img.overid);
                if (ele) {
                    obj.removeChild(ele)
                }
                ele = mapzoom.G(img.infoid);
                if (ele) {
                    obj.removeChild(ele)
                }
                ele = mapzoom.G(img.ctrlid);
                if (ele) {
                    obj.removeChild(ele)
                }
                ele = mapzoom.G(img.xycoid);
                if (ele) {
                    obj.removeChild(ele)
                }
                ele = mapzoom.G(img.isrcid);
                if (ele) {
                    obj.removeChild(ele)
                }
                ele = mapzoom.E('img');
                ele.id = img.id;
                img.id = "";
                img.ctrlid = false;
                ele.width = (v ? img.maxwidth : img.minwidth);
                ele.height = (v ? img.maxheight : img.minheight);
                ele.style.width = (v ? img.maxwidth : img.minwidth) + 'px';
                ele.style.height = (v ? img.maxheight : img.minheight) + 'px';
                ele.style.border = "0px none";
                ele.style.cursor = "default";
                ele.src = img.highres;
                if (img.mapname) {
                    ele.usemap = '#' + img.mapname;
                    ele.setAttribute("usemap", "#" + img.mapname)
                }
                obj.style.width = (v ? img.maxwidth : img.minwidth) + 'px';
                obj.style.height = (v ? img.maxheight : img.minheight) + 'px';
                obj.removeChild(img.parentNode);
                obj.appendChild(ele)
            }
            return false
        }, construct: function (img, v) {
            if (img && typeof (v) === "object" && typeof (img.ctrlid) === "string") {
                var i, d, x, y, w, h, p, q, r, t, g, s, z, m, n, oe, oes, ie, ies, ele, l = v.length;
                for (i = 0; i < l; i++) {
                    w = v[i].w || 0;
                    h = v[i].h || 0;
                    s = v[i].src || 0;
                    q = v[i].noscale || 0;
                    d = v[i].id || 0;
                    if (d) {
                        ele = mapzoom.G(d)
                    } else {
                        ele = false
                    } if (!ele && w >= 8 && h >= 8 && s != '') {
                        x = Math.abs(v[i].x) || 0;
                        y = Math.abs(v[i].y) || 0;
                        p = Math.max(Math.min(Math.abs(v[i].pos), 9), 0) || 0;
                        z = v[i].src2 || 0;
                        r = v[i].href || 0;
                        t = v[i].title || 0;
                        g = v[i].target || 0;
                        oe = mapzoom.E('a');
                        oes = oe.style;
                        if (d) {
                            oe.id = d
                        }
                        if (r) {
                            oe.href = r
                        }
                        if (g) {
                            oe.target = g
                        }
                        oe.unselectable = "on";
                        oes.border = "0px none";
                        oes.fontSize = "0px";
                        oes.lineHeight = "0px";
                        oes.margin = "0px";
                        oes.padding = "0px";
                        oes.textDecoration = "none";
                        oes.mozUserSelect = oes.khtmlUserSelect = oes.webkitUserSelect = "none";
                        img.appendChild(oe);
                        ie = mapzoom.E('img');
                        ie.width = w;
                        ie.height = h;
                        ies = ie.style;
                        if (img.notrans) {
                            ies.background = "transparent";
                            ie.src = img.curpath + "nop.gif";
                            ie.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + s + "',sizingMethod='scale')"
                        } else {
                            ie.src = s
                        } if (t) {
                            ie.title = t
                        }
                        ie.unselectable = "on";
                        ies.position = "absolute";
                        ies.margin = "0px";
                        ies.padding = "0px";
                        ies.border = "0px none";
                        ies.width = q ? w + 'px' : (w / (img.maxwidth / 100)) + '%';
                        ies.height = q ? h + 'px' : (h / (img.maxheight / 100)) + '%';
                        n = (img.maxheight / 100);
                        m = (img.maxwidth / 100);
                        if (q) {
                            ies.top = (y ? y / n : 0) + '%';
                            ies.left = (x ? x / m : 0) + '%'
                        } else {
                            if (!p || p == 4 || p == 5 || p == 6) {
                                ies.top = ((y ? y / n : 0) - (parseFloat(ies.height) / 2)) + '%'
                            } else if (p == 7 || p == 8 || p == 9) {
                                ies.top = ((y ? y / n : 0) - parseFloat(ies.height)) + '%'
                            } else if (p == 1 || p == 2 || p == 3) {
                                ies.top = (y ? y / n : 0) + '%'
                            }
                            if (!p || p == 2 || p == 5 || p == 8) {
                                ies.left = ((x ? x / m : 0) - (parseFloat(ies.width) / 2)) + '%'
                            } else if (p == 3 || p == 6 || p == 9) {
                                ies.left = ((x ? x / m : 0) - parseFloat(ies.width)) + '%'
                            } else if (p == 1 || p == 4 || p == 7) {
                                ies.left = (x ? x / m : 0) + '%'
                            }
                        }
                        ies.mozUserSelect = ies.khtmlUserSelect = ies.webkitUserSelect = "none";
                        ies.msInterpolationMode = img.bicubic;
                        if (z) {
                            ie.first = s;
                            ie.secnd = z;
                            if (!img.trident) {
                                ie.setAttribute("onmouseover", "this.src=this.secnd;");
                                ie.setAttribute("onmouseout", "this.src=this.first;")
                            }
                        }
                        oe.appendChild(ie);
                        if (z && img.trident) {
                            oe.onmouseover = mapzoom._switchOver;
                            oe.onmouseout = mapzoom._switchOut
                        }
                    }
                }
            }
            return false
        }, restruct: function (img, v, o) {
            if (img && v && o && typeof (img.ctrlid) === "string") {
                var ele = mapzoom.G(v);
                if (ele) {
                    if (o.target) {
                        ele.target = o.target
                    }
                    if (o.title) {
                        ele.title = o.title
                    }
                    if (o.href) {
                        ele.href = o.href
                    }
                }
            }
            return false
        }, destruct: function (img, v) {
            if (img && v && typeof (img.ctrlid) === "string") {
                if (typeof (v) === "string") {
                    var ele = mapzoom.G(v);
                    if (ele) {
                        img.removeChild(ele)
                    }
                }
                if (typeof (v) === "boolean") {
                    while (img.hasChildNodes()) {
                        if (img.lastChild.nodeName == "A") {
                            img.removeChild(img.lastChild)
                        } else {
                            break
                        }
                    }
                }
            }
            return false
        }, moveto: function (img, x, y) {
            if (img && typeof (img.ctrlid) === "string") {
                if ((img.parentNode.width > img.minwidth) || (img.parentNode.height > img.minheight)) {
                    function LFL(m, i, n) {
                        var d = parseFloat(m);
                        if (d > n) {
                            d = n
                        } else if (d < i) {
                            d = i
                        }
                        return d
                    }
                    var f, h, v, q = parseFloat((img.parentNode.width - img.minwidth) / (img.maxwidth - img.minwidth));
                    if (typeof (x) == "string") {
                        if (x.match(/^([+-])?\d*([\.])?\d*$/)) {
                            f = (LFL(x, -180, 180) * -1) + 180;
                            x = f * (((img.maxwidth - img.minwidth) * q) / 360);
                            h = (0.5 - (f / 360)) * img.minwidth;
                            x = x - h
                        } else if (x.match(/^\d*([\.])?\d*([%]){1,1}$/)) {
                            x = ((img.maxwidth - img.minwidth) * q) * (parseFloat(x) / 100)
                        } else {
                            x = 0
                        }
                    } else {
                        x = (x - (img.minwidth / 2)) * q
                    } if (typeof (y) == "string") {
                        if (y.match(/^([+-])?\d*([\.])?\d*$/)) {
                            f = (LFL(y, -90, 90) * -1) + 90;
                            y = f * (((img.maxheight - img.minheight) * q) / 180);
                            v = (0.5 - (f / 180)) * img.minheight;
                            y = y - v
                        } else if (y.match(/^\d*([\.])?\d*([%]){1,1}$/)) {
                            y = ((img.maxheight - img.minheight) * q) * (parseFloat(y) / 100)
                        } else {
                            y = 0
                        }
                    } else {
                        y = (y - (img.minheight / 2)) * q
                    }
                    h = Math.max(0, Math.min(img.maxleft, x || 0));
                    v = Math.max(0, Math.min(img.maxtop, y || 0));
                    img.parentNode.style.left = (h * -1) + 'px';
                    img.parentNode.style.top = (v * -1) + 'px';
                    img.parentNode.left = (h * -1);
                    img.parentNode.top = (v * -1);
                    if (img.overview) {
                        var view = mapzoom.G(img.viewid).style;
                        view.left = Math.round((Math.abs(parseInt(img.parentNode.style.left, 10)) / (img.parentNode.width / img.minwidth)) * img.ovsfact) - (img.bmode ? 2 : 0) + 'px';
                        view.top = Math.round((Math.abs(parseInt(img.parentNode.style.top, 10)) / (img.parentNode.height / img.minheight)) * img.ovsfact) - (img.bmode ? 2 : 0) + 'px'
                    }
                }
            }
            return false
        }, zooming: function (img, v) {
            if (img && typeof (img.ctrlid) === "string") {
                if (typeof (v) === "number") {
                    var mw, mh, mx, my, f;
                    v = Math.max(0, Math.min(100, parseFloat(v)));
                    f = v > 0 ? v / 100 : 0;
                    mw = Math.round(f * (img.maxwidth - img.minwidth)) + img.minwidth;
                    mh = Math.round(f * (img.maxheight - img.minheight)) + img.minheight;
                    mx = Math.round((mw / 2) - (img.minwidth / 2)) * -1;
                    my = Math.round((mh / 2) - (img.minheight / 2)) * -1;
                    img.parentNode.style.width = mw + 'px';
                    img.parentNode.style.height = mh + 'px';
                    img.parentNode.style.left = mx + 'px';
                    img.parentNode.style.top = my + 'px';
                    img.parentNode.width = mw;
                    img.parentNode.height = mh;
                    img.parentNode.left = mx;
                    img.parentNode.top = my;
                    img.maxleft = img.parentNode.width - img.minwidth;
                    img.maxtop = img.parentNode.height - img.minheight;
                    if (img.parentNode.width > img.minwidth || img.parentNode.height > img.minheight) {
                        if (img.trident) {
                            img.style.cursor = "url('" + img.curpath + "grab.cur'),move"
                        } else {
                            img.style.cursor = "move"
                        } if (img.overview) {
                            mapzoom._setOverview(img);
                            mapzoom.G(img.overid).style.visibility = "visible"
                        }
                    } else {
                        img.style.cursor = "crosshair";
                        if (img.overview) {
                            mapzoom.G(img.overid).style.visibility = "hidden"
                        }
                    }
                }
            }
            return false
        }, kenburns: function (img, obj) {
            if (img && typeof (img.ctrlid) === "string") {
                function GNV(v) {
                    if (typeof (v) === "number") {
                        v = Math.max(0, Math.min(100, parseFloat(v)))
                    } else {
                        v = 0.5
                    }
                    return v
                };
                var io = false,
                    x = obj[0],
                    y = obj[1],
                    z = obj[2],
                    p = obj[3] || false,
                    s = obj[4] || false,
                    d = obj[5] || false,
                    b = obj[6] || false,
                    a = obj[7] || false;
                if (typeof (p) === "number") {
                    if (p == 3) {
                        io = true
                    } else if (p == 0) {
                        p = 1
                    } else {
                        p = Math.max(0, Math.min(2, parseFloat(p)))
                    }
                } else {
                    p = 1
                } if (typeof (s) === "number") {
                    s = Math.max(10, Math.min(100, parseInt(s)))
                }
                if (typeof (d) === "number") {
                    d = Math.max(10, Math.min(100, parseInt(d)))
                } else {
                    d = 30
                }
                var fz, mz, ix, iy, wf, hf, sw, sh, sx, sy, ew, eh, ex, ey;
                x = GNV(x);
                y = GNV(y);
                z = GNV(z);
                fz = z * 0.01;
                if (img.lowres && img.highres) {
                    mapzoom.source(img, img.lowres, false, true)
                }
                img.zoomin = false;
                img.zoomout = false;
                if (img.parentNode.width > img.minwidth || img.parentNode.height > img.minheight) {
                    if (img.trident) {
                        img.style.cursor = "url('" + img.curpath + "grab.cur'),move"
                    } else {
                        img.style.cursor = "move"
                    }
                } else {
                    img.style.cursor = "crosshair"
                }
                ix = (img.maxwidth - img.minwidth) * (x * 0.01);
                iy = (img.maxheight - img.minheight) * (y * 0.01);
                sw = parseInt(img.parentNode.style.width, 10);
                sh = parseInt(img.parentNode.style.height, 10);
                sx = parseInt(img.parentNode.style.left, 10);
                sy = parseInt(img.parentNode.style.top, 10);
                ew = z > -1 ? Math.round(fz * (img.maxwidth - img.minwidth)) + img.minwidth : sw;
                eh = z > -1 ? Math.round(fz * (img.maxheight - img.minheight)) + img.minheight : sh;
                wf = parseFloat((ew - img.minwidth) / (img.maxwidth - img.minwidth));
                hf = parseFloat((eh - img.minheight) / (img.maxheight - img.minheight));
                ex = Math.max(0, Math.min(ew - img.minwidth, ix * wf)) * -1;
                ey = Math.max(0, Math.min(eh - img.minheight, iy * hf)) * -1;
                if (typeof (s) !== "number") {
                    mz = Math.abs(Math.abs(ex) - Math.abs(sx));
                    mz = Math.max(mz, Math.abs(Math.abs(ey) - Math.abs(sy)));
                    mz = Math.max(mz, Math.abs(Math.abs(ew) - Math.abs(sw)));
                    mz = Math.max(mz, Math.abs(Math.abs(eh) - Math.abs(sh)));
                    s = Math.round(mz / d)
                }
                if (img.timer) {
                    window.clearInterval(img.timer)
                }
                var mx, my, mw, mh, q = 0,
                    c = 0,
                    t = Math.max(5, s),
                    k = 1 / t;
                img.timer = window.setInterval(function () {
                    q = io ? ((-Math.cos((k * c) * Math.PI) / 2) + 0.5) || 0 : Math.pow((k * c), p) || 0;
                    mw = Math.ceil(sw + (q * (ew - sw)));
                    mh = Math.ceil(sh + (q * (eh - sh)));
                    mx = Math.ceil(sx + (q * (ex - sx)));
                    my = Math.ceil(sy + (q * (ey - sy)));
                    img.parentNode.style.width = mw + 'px';
                    img.parentNode.style.height = mh + 'px';
                    img.parentNode.style.left = mx + 'px';
                    img.parentNode.style.top = my + 'px';
                    img.parentNode.width = mw;
                    img.parentNode.height = mh;
                    img.parentNode.left = mx;
                    img.parentNode.top = my;
                    if (img.divbug) {
                        img.parentNode.firstChild.style.width = mw + 'px';
                        img.parentNode.firstChild.style.height = mh + 'px'
                    }
                    c++;
                    if (c > t) {
                        window.clearInterval(img.timer);
                        img.maxleft = img.parentNode.width - img.minwidth;
                        img.maxtop = img.parentNode.height - img.minheight;
                        img.zoomin = false;
                        img.zoomout = false;
                        if (img.lowres && img.highres) {
                            mapzoom.source(img, img.highres, false, true)
                        }
                        if (img.parentNode.width > img.minwidth || img.parentNode.height > img.minheight) {
                            if (img.trident) {
                                img.style.cursor = "url('" + img.curpath + "grab.cur'),move"
                            } else {
                                img.style.cursor = "move"
                            } if (img.overview) {
                                mapzoom._setOverview(img);
                                mapzoom.G(img.overid).style.visibility = "visible"
                            }
                        } else {
                            img.style.cursor = "crosshair";
                            if (img.overview) {
                                mapzoom.G(img.overid).style.visibility = "hidden"
                            }
                        } if (img.automode) {
                            if (b && typeof (b) === "string" && eval('typeof ' + b) == "function") {
                                window.setTimeout("window['" + b + "']('" + (typeof (a) == 'number' || typeof (a) == 'string' ? a : '') + "')", 30)
                            }
                            window.setTimeout("mapzoom._next(mapzoom.G('" + img.id + "'))", img.autowait + 1000)
                        } else {
                            if (b && typeof (b) === "string" && eval('typeof ' + b) == "function") {
                                window.setTimeout("window['" + b + "']('" + (typeof (a) == 'number' || typeof (a) == 'string' ? a : '') + "')", 200)
                            }
                        }
                    }
                }, d)
            }
            return false
        }, play: function (img, d, l, obj, c) {
            if (img && typeof (img.ctrlid) === "string") {
                if (!img.automode && typeof (d) === "number" && typeof (l) === "boolean" && typeof (obj) === "object") {
                    if (obj.length >= 1) {
                        var n = 0,
                            mx = 3,
                            t = obj.length,
                            i;
                        for (i = 0; i < t; ++i) {
                            n = Math.max(0, obj[i].length);
                            mx = n < mx ? n : mx
                        }
                        img.callback = (c && typeof (c) === "string" && eval('typeof ' + c) == "function" ? c : 0);
                        if (mx >= 3) {
                            img.step = obj;
                            img.cpos = 0;
                            img.automode = true;
                            img.autoloop = l;
                            img.autowait = Math.abs(d);
                            img.nozoom = true;
                            if (img.overview) {
                                mapzoom.set(img, 'overview', false)
                            }
                            if (img.buttons && !img.tod) {
                                mapzoom.set(img, 'buttons', false)
                            }
                            if (img.showcoords && !img.tod) {
                                mapzoom.set(img, 'showcoords', false)
                            }
                            mapzoom.kenburns(mapzoom.G(img.id), img.step[img.cpos])
                        }
                    }
                }
            }
            return false
        }, stop: function (img) {
            if (img && typeof (img.ctrlid) === "string") {
                if (img.automode) {
                    img.automode = false;
                    if (img.timer) {
                        window.clearInterval(img.timer)
                    }
                    img.autoloop = false;
                    img.cpos = 0;
                    img.maxleft = img.parentNode.width - img.minwidth;
                    img.maxtop = img.parentNode.height - img.minheight;
                    if (img.lowres && img.highres) {
                        mapzoom.source(img, img.highres, false, true)
                    }
                    if (img.parentNode.width > img.minwidth || img.parentNode.height > img.minheight) {
                        if (img.trident) {
                            img.style.cursor = "url('" + img.curpath + "grab.cur'),move"
                        } else {
                            img.style.cursor = "move"
                        } if (img.overview) {
                            mapzoom._setOverview(img);
                            mapzoom.G(img.overid).style.visibility = "visible"
                        }
                    } else {
                        img.style.cursor = "crosshair";
                        if (img.overview) {
                            mapzoom.G(img.overid).style.visibility = "hidden"
                        }
                    } if (img.callback) {
                        window.setTimeout("window['" + img.callback + "']()", 200)
                    }
                }
            }
            return false
        }, source: function (img, src, v, z) {
            if (img && typeof (img.ctrlid) === "string") {
                if (typeof (src) === "string" && typeof (v) === "boolean") {
                    var tmp = new Image();
                    mapzoom.G(img.xrefid);
                    tmp.onload = function () {
                        mapzoom.G(img.ctrlid).style.visibility = "hidden";
                        mapzoom.G(img.overid).style.visibility = "hidden";
                        mapzoom.G(img.xycoid).style.visibility = "hidden";
                        if (v == true) {
                            mapzoom.G(img.isrcid).src = tmp.src;
                            if (!z) {
                                if (img.trident) {
                                    tmp.onload = '';
                                    tmp = null
                                }
                                delete tmp
                            }
                            mapzoom._fadeOut(img.id, 100)
                        } else if (v == false) {
                            var obj = mapzoom.G(img.xrefid);
                            obj.src = tmp.src;
                            obj.style.msInterpolationMode = img.bicubic;
                            if (!z) {
                                mapzoom.G(img.tumbid).src = obj.src;
                                if (img.highres != obj.src) {
                                    img.highres = obj.src
                                }
                                if (img.trident) {
                                    tmp.onload = '';
                                    tmp = null
                                }
                                delete tmp
                            }
                            if (img.buttons && !img.tod) {
                                mapzoom.G(img.ctrlid).style.visibility = "visible"
                            }
                            if (img.overview && (img.parentNode.width > img.minwidth || img.parentNode.height > img.minheight)) {
                                mapzoom.G(img.overid).style.visibility = "visible"
                            }
                            if (img.showcoords && !img.tod) {
                                mapzoom.G(img.xycoid).style.visibility = "visible"
                            }
                        }
                    };
                    tmp.src = src
                }
            }
            return false
        }, lowsource: function (img, src) {
            if (img && typeof (img.ctrlid) === "string") {
                if (typeof (src) === "string" && !img.automode && !img.zoomin && !img.zoomout) {
                    var low = new Image();
                    low.onload = function () {
                        img.lowres = low.src;
                        if (img.trident) {
                            low.onload = '';
                            low = null
                        }
                        delete low
                    };
                    low.src = src
                }
            }
            return false
        }, info: function (img, v) {
            if (img && typeof (img.ctrlid) === "string") {
                if (v && typeof (v) === "string") {
                    img.infoblock = v
                } else {
                    img.infoblock = img.defblock
                }
            }
            return false
        }, areaover: function (img, a) {
            var ele = mapzoom.G(a);
            if (img && ele && typeof (img.ctrlid) === "string") {
                if (img.svg) {
                    mapzoom._onSVGOver(ele)
                } else if (img.vml) {
                    mapzoom._onVMLOver(ele)
                }
            }
            return false
        }, areaout: function (img, a) {
            var ele = mapzoom.G(a);
            if (img && ele && typeof (img.ctrlid) === "string") {
                if (img.svg) {
                    mapzoom._onSVGOut(ele)
                } else if (img.vml) {
                    mapzoom._onVMLOut(ele)
                }
            }
            return false
        }, deletearea: function (img, v) {
            if (img && v && typeof (img.ctrlid) === "string") {
                if (img.map && (img.svg || img.vml)) {
                    if (typeof (v) === "string") {
                        var ele = mapzoom.G(v);
                        if (ele) {
                            img.firstChild.removeChild(ele);
                            if (img.tod) {
                                ele.ontouchstart = ele.ontouchend = null;
                                if (img.tip) {
                                    mapzoom.R(ele, "touchstart", cvi_tip._show);
                                    mapzoom.R(ele, "touchmove", cvi_tip._move);
                                    mapzoom.R(ele, "touchend", cvi_tip._hide)
                                }
                            } else {
                                for (var i = 0; i < img.plo.length; i++) {
                                    if (img.plo[i] == v) {
                                        img.plo.splice(i, 1);
                                        break
                                    }
                                }
                                ele.onmousedown = ele.onmouseup = ele.onmouseover = ele.onmouseout = null;
                                if (img.tip) {
                                    mapzoom.R(ele, "mouseover", cvi_tip._show);
                                    mapzoom.R(ele, "mousemove", cvi_tip._move);
                                    mapzoom.R(ele, "mouseout", cvi_tip._hide)
                                }
                            }
                        }
                    }
                    if (typeof (v) === "boolean") {
                        var ele = img.firstChild;
                        img.plo = [];
                        while (ele.hasChildNodes()) {
                            if (img.tod) {
                                ele.ontouchstart = ele.ontouchend = null;
                                if (img.tip) {
                                    mapzoom.R(ele, "touchstart", cvi_tip._show);
                                    mapzoom.R(ele, "touchmove", cvi_tip._move);
                                    mapzoom.R(ele, "touchend", cvi_tip._hide)
                                }
                            } else {
                                ele.onmousedown = ele.onmouseup = ele.onmouseover = ele.onmouseout = null;
                                if (img.tip) {
                                    mapzoom.R(ele.lastChild, "mouseover", cvi_tip._show);
                                    mapzoom.R(ele.lastChild, "mousemove", cvi_tip._move);
                                    mapzoom.R(ele.lastChild, "mouseout", cvi_tip._hide)
                                }
                            }
                            ele.removeChild(ele.lastChild)
                        }
                    }
                }
            }
            if (!img.trident) {
                return false
            }
        }, createarea: function (img, id, opts) {
            function gX(v, m) {
                var t = img.xfactor * parseFloat(v);
                return isNaN(t) ? 0 : m ? t : Math.max(t, 0)
            };

            function gY(v, m) {
                var t = img.yfactor * parseFloat(v);
                return isNaN(t) ? 0 : m ? t : Math.max(t, 0)
            };

            function vX(v) {
                var t = parseInt(img.xfactor * v * 10, 10);
                return isNaN(t) ? 0 : Math.max(t, 0)
            };

            function vY(v) {
                var t = parseInt(img.yfactor * v * 10, 10);
                return isNaN(t) ? 0 : Math.max(t, 0)
            };
            if (img && img.map && typeof (img.ctrlid) === "string") {
                if (typeof (id) === "string" && !mapzoom.G(id)) {
                    if (opts.shape.match(/rect|circle|polygon|poly|polyline|path|line|ellipse/i) && opts.coords != '') {
                        var p = "",
                            l = "",
                            y = null,
                            t = null,
                            r = null,
                            q = null,
                            i, j, k, b, z, v, u, ele, tmp = mapzoom.G(img.id + (img.svg ? "_svg" : "_vml"));
                        v = opts.coords.split(',');
                        r = opts.rel;
                        q = opts.rev;
                        l = opts.classes || "";
                        u = l ? l.split(" ") : "";
                        if (typeof (opts.alttitle) == "string") {
                            t = opts.alttitle
                        }
                        if (typeof (opts.tooltip) == "string") {
                            y = opts.tooltip
                        }
                        if (img.svg && tmp) {
                            if (opts.shape.toLowerCase() == 'path') {
                                ele = tmp.ownerDocument.createElementNS(img.svgns, "path");
                                z = [];
                                p = mapzoom._splitPath(opts.coords);
                                for (j = 0; j < p.length; j++) {
                                    if (p[j][0].toUpperCase() === "A") {
                                        p[j][1] = gX(p[j][1], 1);
                                        p[j][2] = gY(p[j][2], 1);
                                        p[j][6] = gX(p[j][6], 1);
                                        p[j][7] = gY(p[j][7], 1);
                                        for (i = 8; i < p[j].length; i += 7) {
                                            p[j][i + 6] = gX(p[j][i + 6], 1);
                                            p[j][i + 5] = gY(p[j][i + 5], 1);
                                            p[j][i] = gX(p[j][i], 1);
                                            p[j][i + 1] = gY(p[j][i + 1], 1)
                                        }
                                    } else {
                                        for (i = 2; i < p[j].length; i += 2) {
                                            p[j][i - 1] = gX(p[j][i - 1], 1);
                                            p[j][i] = gY(p[j][i], 1)
                                        }
                                    }
                                }
                                for (j = 0; j < p.length; j++) {
                                    z = z.concat(p[j])
                                }
                                p = z.join(" ");
                                ele.setAttribute("d", p);
                                ele.shapeform = "path"
                            } else if (opts.shape.toLowerCase() == 'rect') {
                                ele = tmp.ownerDocument.createElementNS(img.svgns, "rect");
                                ele.setAttribute("x", gX(v[0]));
                                ele.setAttribute("y", gY(v[1]));
                                ele.setAttribute("width", gX(v[2] - v[0]));
                                ele.setAttribute("height", gY(v[3] - v[1]));
                                ele.shapeform = "rect";
                                ele.coords = opts.coords
                            } else if (opts.shape.toLowerCase() == 'circle') {
                                ele = tmp.ownerDocument.createElementNS(img.svgns, "circle");
                                ele.setAttribute("cx", gX(v[0]));
                                ele.setAttribute("cy", gY(v[1]));
                                ele.setAttribute("r", gX(v[2]));
                                ele.shapeform = "circle";
                                ele.coords = opts.coords
                            } else if (opts.shape.toLowerCase() == 'ellipse') {
                                ele = tmp.ownerDocument.createElementNS(img.svgns, "ellipse");
                                ele.setAttribute("cx", gX(v[0]));
                                ele.setAttribute("cy", gY(v[1]));
                                ele.setAttribute("rx", gX(v[2]));
                                ele.setAttribute("ry", gY(v[3]));
                                ele.shapeform = "ellipse";
                                q = null;
                                ele.coords = opts.coords
                            } else if (opts.shape.toLowerCase() == 'line') {
                                ele = tmp.ownerDocument.createElementNS(img.svgns, "line");
                                ele.setAttribute("x1", gX(v[0]));
                                ele.setAttribute("y1", gY(v[1]));
                                ele.setAttribute("x2", gX(v[2]));
                                ele.setAttribute("y2", gY(v[3]));
                                ele.shapeform = "line";
                                q = null
                            } else if (opts.shape.toLowerCase() == 'polyline') {
                                for (i = 0; i < v.length; i += 2) {
                                    p += gX(v[i]) + ' ' + gY(v[i + 1]) + ' '
                                }
                                ele = tmp.ownerDocument.createElementNS(img.svgns, "polyline");
                                ele.setAttribute("points", p);
                                ele.shapeform = "polyline";
                                q = null
                            } else {
                                if (q != null) {
                                    b = q.split(",");
                                    if (b && b.length > 0) {
                                        var sel, m, n, z;
                                        p += 'M ' + gX(v[0]) + ' ' + gY(v[1]) + ' L ';
                                        for (i = 2; i < v.length; i += 2) {
                                            p += gX(v[i]) + ' ' + gY(v[i + 1]) + ' '
                                        }
                                        p += 'z ';
                                        for (k = 0; k < b.length; k++) {
                                            sel = document.getElementById(b[k]);
                                            z = null;
                                            z = sel.coords.split(',');
                                            if (sel.shapeform == "rect") {
                                                p += 'M ' + gX(z[0]) + ' ' + gY(z[1]) + ' L ' + gX(z[0]) + ' ' + gY(z[3]) + ' ' + gX(z[2]) + ' ' + gY(z[3]) + ' ' + gX(z[2]) + ' ' + gY(z[1]) + ' z '
                                            } else if (sel.shapeform == "circle") {
                                                m = gX(z[2]);
                                                p += 'M ' + gX(z[0] - z[2]) + ' ' + gY(z[1]) + ' c 0,' + m + ' ' + m + ',' + m + ' ' + m + ',' + m + ' c ' + m + ',0 ' + m + ',-' + m + ' ' + m + ',-' + m + ' c 0,-' + m + ' -' + m + ',-' + m + ' -' + m + ',-' + m + ' c -' + m + ',0 -' + m + ',' + m + ' -' + m + ',' + m + ' z '
                                            } else if (sel.shapeform == "ellipse") {
                                                m = gX(z[2]);
                                                n = gY(z[3]);
                                                p += 'M ' + gX(z[0] - z[2]) + ' ' + gY(z[1]) + ' c 0,' + n + ' ' + m + ',' + n + ' ' + m + ',' + n + ' c ' + m + ',0 ' + m + ',-' + n + ' ' + m + ',-' + n + ' c 0,-' + n + ' -' + m + ',-' + n + ' -' + m + ',-' + n + ' c -' + m + ',0 -' + m + ',' + n + ' -' + m + ',' + n + ' z '
                                            } else if (!sel.shapeform.match(/polyline|line/i)) {
                                                p += 'M ' + gX(z[0]) + ' ' + gY(z[1]) + ' L ';
                                                for (i = 2; i < z.length; i += 2) {
                                                    p += gX(z[i]) + ' ' + gY(z[i + 1]) + ' '
                                                }
                                                p += 'Z '
                                            }
                                        }
                                        ele = tmp.ownerDocument.createElementNS(img.svgns, "path");
                                        ele.setAttribute("fill-rule", "evenodd");
                                        ele.setAttribute("d", p);
                                        ele.shapeform = "xpath";
                                        ele.bother = b
                                    }
                                } else {
                                    for (i = 0; i < v.length; i += 2) {
                                        p += gX(v[i]) + ' ' + gY(v[i + 1]) + ' '
                                    }
                                    ele = tmp.ownerDocument.createElementNS(img.svgns, "polygon");
                                    ele.setAttribute("points", p);
                                    ele.shapeform = "polygon"
                                }
                            }
                            k = ele.shapeform.match(/polyline|line/i) ? 1 : 0;
                            if (ele) {
                                if (r != null) {
                                    ele.other = r.split(",")
                                }
                                if (typeof (opts.href) == "string") {
                                    mapzoom.P(ele, opts)
                                }
                                ele.fading = img.vafading;
                                ele.sys = "svg";
                                ele.vbw = img.vbw;
                                ele.forcegroup = l.indexOf('forcegroup') != -1 ? mapzoom.gA(u, "forcegroup") : false;
                                ele.noborder = l.indexOf('noborder') != -1 ? mapzoom.gA(u, "noborder") : img.vnborder;
                                ele.specified = l.indexOf('specified') != -1 ? mapzoom.gA(u, "specified") : false;
                                ele.vaopac = l.indexOf('vaopacity') != -1 ? mapzoom.gV(u, "vaopacity") / 100 : img.vaopac;
                                ele.vacolor = l.indexOf('vacolor') != -1 ? mapzoom.gC(u, "vacolor", img.vacolor) : img.vacolor;
                                ele.vbopac = l.indexOf('vbopacity') != -1 ? mapzoom.gV(u, "vbopacity") / 100 : img.vbopac;
                                ele.vbcolor = l.indexOf('vbcolor') != -1 ? mapzoom.gC(u, "vbcolor", img.vbcolor) : img.vbcolor;
                                ele.vbc = l.indexOf('vbcapround') != -1 ? mapzoom.gA(u, "vbcapround") : false;
                                if (k) {
                                    ele.vaopac = 0;
                                    p = l.indexOf('vbdash') != -1 ? mapzoom.gV(u, "vbdash") : 0;
                                    ele.vbw = l.indexOf('vbwidth') != -1 ? mapzoom.gV(u, "vbwidth") / 100 : .25;
                                    ele.vbdash = "";
                                    if (p) {
                                        p = ele.vbc ? img.dsh[p].r : img.dsh[p].a;
                                        for (z = 0; z < p.length; z++) {
                                            ele.vbdash += (p[z] * (ele.vbw * 5) * img.xfactor) + ","
                                        }
                                        if (ele.vbdash.substr(ele.vbdash.length - 1, 1) === ",") {
                                            ele.vbdash = ele.vbdash.slice(0, -1)
                                        }
                                    }
                                }
                                ele.vbdash = ele.vbdash || "0";
                                if (ele.specified) {
                                    ele.pacolor = l.indexOf('pacolor') != -1 ? mapzoom.gC(u, "pacolor", img.pvacolor) : img.pvacolor;
                                    ele.paopac = l.indexOf('paopacity') != -1 ? mapzoom.gV(u, "paopacity") / 100 : img.pvaopac;
                                    ele.pbopac = l.indexOf('pbopacity') != -1 ? mapzoom.gV(u, "pbopacity") / 100 : img.pvbopac;
                                    ele.pbcolor = l.indexOf('pbcolor') != -1 ? mapzoom.gC(u, "pbcolor", img.pvbcolor) : img.pvbcolor;
                                    if (k) {
                                        ele.paopac = 0
                                    }
                                    ele.setAttribute("style", "stroke-dasharray:" + ele.vbdash + ";stroke-linejoin:" + (ele.vbc ? "round" : "miter") + ";stroke-linecap:" + (ele.vbc ? "round" : "butt") + ";stroke-width:" + (!k && ele.noborder ? 0 : ele.vbw) + "%;stroke:" + ele.pbcolor + ";stroke-opacity:" + ele.pbopac + ";fill:" + ele.pacolor + ";fill-opacity:" + ele.paopac + ";")
                                } else {
                                    ele.setAttribute("style", "stroke-dasharray:" + ele.vbdash + ";stroke-linejoin:" + (ele.vbc ? "round" : "miter") + ";stroke-linecap:" + (ele.vbc ? "round" : "butt") + ";stroke-width:" + (!k && ele.noborder ? 0 : ele.vbw) + "%;stroke:" + ele.vbcolor + ";stroke-opacity:0;fill:" + ele.vacolor + ";fill-opacity:0;")
                                }
                                ele.setAttribute("id", id);
                                if (img.tod) {
                                    ele.ontouchstart = function () {
                                        mapzoom._onSVGOver(this)
                                    };
                                    ele.ontouchend = function () {
                                        mapzoom._onSVGOut(this)
                                    };
                                    if (img.tip && y != null) {
                                        ele.setAttribute("tooltip", y);
                                        mapzoom.A(ele, "touchstart", cvi_tip._show);
                                        mapzoom.A(ele, "touchend", cvi_tip._hide)
                                    } else {
                                        if (t != null) {
                                            ele.setAttribute("title", t)
                                        }
                                    }
                                } else {
                                    ele.onmouseover = function () {
                                        mapzoom._onSVGOver(this)
                                    };
                                    ele.onmouseout = function () {
                                        mapzoom._onSVGOut(this)
                                    };
                                    ele.onmousedown = mapzoom._onVectorDown;
                                    ele.onmouseup = mapzoom._onVectorUp;
                                    if (img.tip && y != null) {
                                        ele.setAttribute("tooltip", y);
                                        mapzoom.A(ele, "mouseover", cvi_tip._show);
                                        mapzoom.A(ele, "mousemove", cvi_tip._move);
                                        mapzoom.A(ele, "mouseout", cvi_tip._hide)
                                    } else {
                                        if (t != null) {
                                            ele.setAttribute("title", t)
                                        }
                                    }
                                }
                                tmp.appendChild(ele)
                            }
                        } else if (img.vml && tmp) {
                            if (opts.shape.toLowerCase() == 'path') {
                                ele = mapzoom.E("v:shape");
                                z = [];
                                p = mapzoom._splitPath(opts.coords);
                                ele.path = mapzoom._parsePath(p, img.xfactor, img.yfactor);
                                ele.coordorigin = "0,0";
                                ele.coordsize = (10 * img.maxwidth) + "," + (10 * img.maxheight);
                                ele.style.cssText = 'zoom:1;border:0;margin:0;padding:0;display:block;position:absolute;left:0px;top:0px;width:100%;height:100%;';
                                ele.shapeform = "path";
                                ele.coords = opts.coords
                            } else if (opts.shape.toLowerCase() == 'rect') {
                                ele = mapzoom.E("v:rect");
                                ele.style.cssText = 'zoom:1;border:0;margin:0;padding:0;display:block;position:absolute;left:' + vX(v[0]) + 'px;top:' + vY(v[1]) + 'px;width:' + vX(v[2] - v[0]) + 'px;height:' + vY(v[3] - v[1]) + 'px;';
                                ele.shapeform = "rect";
                                ele.coords = opts.coords
                            } else if (opts.shape.toLowerCase() == 'circle') {
                                ele = mapzoom.E("v:oval");
                                ele.style.cssText = 'zoom:1;border:0;margin:0;padding:0;display:block;position:absolute;left:' + vX(v[0] - v[2]) + 'px;top:' + vY(v[1] - v[2]) + 'px;width:' + (vX(v[2]) * 2) + 'px;height:' + (vY(v[2]) * 2) + 'px;';
                                ele.shapeform = "circle";
                                ele.coords = opts.coords
                            } else if (opts.shape.toLowerCase() == 'ellipse') {
                                ele = mapzoom.E("v:oval");
                                ele.style.cssText = 'zoom:1;border:0;margin:0;padding:0;display:block;position:absolute;left:' + vX(v[0] - v[2]) + 'px;top:' + vY(v[1] - v[3]) + 'px;width:' + (vX(v[2]) * 2) + 'px;height:' + (vY(v[3]) * 2) + 'px;';
                                ele.shapeform = "ellipse";
                                ele.coords = opts.coords;
                                q = null
                            } else if (opts.shape.toLowerCase() == 'line') {
                                ele = mapzoom.E("v:line");
                                ele.from = vX(v[0]) + ',' + vY(v[1]);
                                ele.to = vX(v[2]) + ',' + vY(v[3]);
                                ele.shapeform = "line";
                                ele.coords = opts.coords;
                                q = null
                            } else if (opts.shape.toLowerCase() == 'polyline') {
                                for (i = 2; i < v.length; i += 2) {
                                    p += vX(v[i]) + ',' + vY(v[i + 1]) + ' '
                                }
                                ele = mapzoom.E("v:shape");
                                ele.path = "m " + vX(v[0]) + "," + vY(v[1]) + " l " + p + " e";
                                ele.coordorigin = "0,0";
                                ele.coordsize = (10 * img.maxwidth) + "," + (10 * img.maxheight);
                                ele.style.cssText = 'zoom:1;border:0;margin:0;padding:0;display:block;position:absolute;left:0px;top:0px;width:100%;height:100%;';
                                ele.shapeform = "polyline";
                                ele.coords = opts.coords;
                                q = null
                            } else {
                                if (q != null) {
                                    b = q.split(",");
                                    if (b && b.length > 0) {
                                        var sel, m, w, v, z;
                                        p = "m " + vX(v[0]) + "," + vY(v[1]) + " l ";
                                        for (i = 2; i < v.length; i += 2) {
                                            p += vX(v[i]) + ',' + vY(v[i + 1]) + ' '
                                        }
                                        p += 'x ';
                                        for (k = 0; k < b.length; k++) {
                                            sel = document.getElementById(b[k]);
                                            z = null;
                                            z = sel.coords.split(',');
                                            if (sel.shapeform == "rect") {
                                                p += 'm ' + vX(z[0]) + ',' + vY(z[1]) + ' l ' + vX(z[0]) + ',' + vY(z[3]) + ',' + vX(z[2]) + ',' + vY(z[3]) + ',' + vX(z[2]) + ',' + vY(z[1]) + ' x '
                                            } else if (sel.shapeform == "circle") {
                                                w = vX(z[0]);
                                                v = vX(z[1]);
                                                m = vX(z[2]);
                                                p += 'm ' + (w - m) + ',' + (v - m) + ' ar ' + (w - m) + ',' + (v - m) + ',' + (w + m) + ',' + (v + m) + ',' + (w - m) + ',' + v + ',' + (w - m) + ',' + v + ' x '
                                            } else if (sel.shapeform == "ellipse") {
                                                w = vX(z[0]);
                                                v = vX(z[1]);
                                                m = vX(z[2]);
                                                n = vY(z[3]);
                                                p += 'm ' + (w - m) + ',' + (v) + ' qy ' + (w) + ',' + (v - n) + ' qx ' + (w + m) + ',' + (v) + ' qy ' + (w) + ',' + (v + n) + ' qx ' + (w - m) + ',' + (v) + ' x '
                                            } else if (!sel.shapeform.match(/polyline|line/i)) {
                                                p += 'm ' + vX(z[0]) + ',' + vY(z[1]) + ' l ';
                                                for (i = 2; i < z.length; i += 2) {
                                                    p += vX(z[i]) + ',' + vY(z[i + 1]) + ' '
                                                }
                                                p += 'x '
                                            }
                                        }
                                        p += 'e';
                                        ele = mapzoom.E("v:shape");
                                        ele.path = p;
                                        ele.bother = b;
                                        ele.shapeform = "xpath";
                                        ele.coordorigin = "0,0";
                                        ele.coordsize = (10 * img.maxwidth) + "," + (10 * img.maxheight);
                                        ele.style.cssText = 'zoom:1;border:0;margin:0;padding:0;display:block;position:absolute;left:0px;top:0px;width:100%;height:100%;'
                                    }
                                } else {
                                    for (i = 2; i < v.length; i += 2) {
                                        p += vX(v[i]) + ',' + vY(v[i + 1]) + ' '
                                    }
                                    ele.shapeform = "polygone";
                                    ele.coords = opts.coords;
                                    ele = mapzoom.E("v:shape");
                                    ele.path = "m " + vX(v[0]) + "," + vY(v[1]) + " l " + p + " e";
                                    ele.coordorigin = "0,0";
                                    ele.coordsize = (10 * img.maxwidth) + "," + (10 * img.maxheight);
                                    ele.style.cssText = 'zoom:1;border:0;margin:0;padding:0;display:block;position:absolute;left:0px;top:0px;width:100%;height:100%;'
                                }
                            }
                            k = ele.shapeform.match(/polyline|line/i) ? 1 : 0;
                            if (r != null) {
                                ele.other = r.split(",")
                            }
                            if (typeof (opts.href) == "string") {
                                mapzoom.P(ele, opts)
                            }
                            ele.fading = img.vafading;
                            ele.sys = "vml";
                            ele.vbw = img.vbw;
                            ele.forcegroup = l.indexOf('forcegroup') != -1 ? mapzoom.gA(u, "forcegroup") : false;
                            ele.specified = l.indexOf('specified') != -1 ? mapzoom.gA(u, "specified") : false;
                            ele.vaopac = l.indexOf('vaopacity') != -1 ? mapzoom.gV(u, "vaopacity") / 100 : img.vaopac;
                            ele.vacolor = l.indexOf('vacolor') != -1 ? mapzoom.gC(u, "vacolor", img.vacolor) : img.vacolor;
                            if (ele.specified) {
                                ele.paopac = l.indexOf('paopacity') != -1 ? mapzoom.gV(u, "paopacity") / 100 : img.pvaopac;
                                ele.pacolor = l.indexOf('pacolor') != -1 ? mapzoom.gC(u, "pacolor", img.pvacolor) : img.pvacolor
                            }
                            ele.setAttribute("id", id);
                            ele.setAttribute("unselectable", "on");
                            if (k) {
                                ele.pbopac = l.indexOf('pbopacity') != -1 ? mapzoom.gV(u, "pbopacity") / 100 : img.pbopac;
                                ele.pbcolor = l.indexOf('pbcolor') != -1 ? mapzoom.gC(u, "pbcolor", img.pvbcolor) : img.pbcolor;
                                ele.vbopac = l.indexOf('vbopacity') != -1 ? mapzoom.gV(u, "vbopacity") / 100 : img.vbopac;
                                ele.vbcolor = l.indexOf('vbcolor') != -1 ? mapzoom.gC(u, "vbcolor", img.vbcolor) : img.vbcolor;
                                ele.vbv = (l.indexOf('vbwidth') != -1 ? mapzoom.gV(u, "vbwidth") : 25) / 20;
                                p = parseFloat(img.parentNode.width / img.minwidth);
                                ele.vbw = (ele.vbv * p);
                                ele.vbc = l.indexOf('vbcapround') != -1 ? mapzoom.gA(u, "vbcapround") : false;
                                ele.vbdash = l.indexOf('vbdash') != -1 ? img.dsh[mapzoom.gV(u, "vbdash")].d : "solid";
                                ele.filled = "false";
                                ele.stroked = "true";
                                over = mapzoom.E("v:stroke");
                                over.weight = ele.vbw + "px";
                                over.color = ele.specified ? ele.pbcolor : ele.vbcolor;
                                over.dashstyle = ele.vbdash;
                                over.endcap = ele.vbc ? "round" : "flat";
                                over.joinstyle = ele.vbc ? "round" : "miter";
                                over.opacity = ele.specified ? ele.pbopac : 0;
                                ele.appendChild(over);
                                img.plo.push(id)
                            } else {
                                ele.filled = "true";
                                ele.stroked = "false";
                                over = mapzoom.E("v:fill");
                                over.color = ele.specified ? ele.pacolor : ele.vacolor;
                                over.opacity = ele.specified ? ele.paopac : 0;
                                ele.appendChild(over)
                            }
                            ele.onmouseover = function () {
                                mapzoom._onVMLOver(this)
                            };
                            ele.onmouseout = function () {
                                mapzoom._onVMLOut(this)
                            };
                            ele.onmousedown = mapzoom._onVectorDown;
                            ele.onmouseup = mapzoom._onVectorUp;
                            if (img.tip && y != null) {
                                ele.setAttribute("tooltip", y);
                                mapzoom.A(ele, "mouseover", cvi_tip._show);
                                mapzoom.A(ele, "mousemove", cvi_tip._move);
                                mapzoom.A(ele, "mouseout", cvi_tip._hide)
                            } else {
                                if (t != null) {
                                    ele.setAttribute("title", t);
                                    ele.setAttribute("alt", t)
                                }
                            }
                            tmp.appendChild(ele)
                        }
                    }
                }
            }
        }, modifyarea: function (img, id, opts) {
            function gX(v, m) {
                var t = img.xfactor * parseFloat(v);
                return isNaN(t) ? 0 : m ? t : Math.max(t, 0)
            };

            function gY(v, m) {
                var t = img.yfactor * parseFloat(v);
                return isNaN(t) ? 0 : m ? t : Math.max(t, 0)
            };

            function vX(v) {
                var t = parseInt(img.xfactor * v * 10, 10);
                return isNaN(t) ? 0 : Math.max(t, 0)
            };

            function vY(v) {
                var t = parseInt(img.yfactor * v * 10, 10);
                return isNaN(t) ? 0 : Math.max(t, 0)
            };
            if (img && id && typeof (img.ctrlid) === "string") {
                if (img.map && (img.svg || img.vml)) {
                    if (typeof (id) === "string") {
                        var f = null,
                            y = null,
                            t = null,
                            p = "",
                            l = "",
                            z, r = null,
                            q = null,
                            v = null,
                            u = null,
                            k = null,
                            ele = mapzoom.G(id);
                        if (typeof (opts.coords) == "string") {
                            if (ele.shapeform == 'path') {
                                v = opts.coords
                            } else {
                                v = opts.coords.split(',')
                            }
                        }
                        if (typeof (opts.rel) == "string") {
                            r = opts.rel
                        }
                        if (typeof (opts.rev) == "string") {
                            q = opts.rev
                        }
                        if (typeof (opts.classes) != "undefined") {
                            l = opts.classes || "";
                            u = l ? l.split(" ") : ""
                        }
                        if (typeof (opts.href) == "string") {
                            f = opts
                        }
                        if (typeof (opts.alttitle) == "string") {
                            t = opts.alttitle
                        }
                        if (typeof (opts.tooltip) == "string") {
                            y = opts.tooltip
                        }
                        if (ele) {
                            if (img.tip && y != null) {
                                ele.setAttribute("tooltip", y)
                            } else {
                                if (t != null) {
                                    ele.setAttribute("title", t);
                                    ele.setAttribute("alt", t)
                                }
                            } if (r != null) {
                                ele.other = r.split(",")
                            }
                            if (f != null) {
                                mapzoom.P(ele, f)
                            }
                            if (l) {
                                if (l.indexOf('forcegroup') != -1) {
                                    ele.forcegroup = mapzoom.gA(u, "forcegroup")
                                }
                                if (l.indexOf('noborder') != -1) {
                                    ele.noborder = mapzoom.gA(u, "noborder")
                                }
                                if (l.indexOf('specified') != -1) {
                                    ele.specified = mapzoom.gA(u, "specified")
                                }
                                if (l.indexOf('vbopacity') != -1) {
                                    ele.vbopac = mapzoom.gV(u, "vbopacity") / 100
                                }
                                if (l.indexOf('vaopacity') != -1) {
                                    ele.vaopac = mapzoom.gV(u, "vaopacity") / 100
                                }
                                if (l.indexOf('vbcolor') != -1) {
                                    ele.vbcolor = mapzoom.gC(u, "vbcolor", img.vbcolor)
                                }
                                if (l.indexOf('vacolor') != -1) {
                                    ele.vacolor = mapzoom.gC(u, "vacolor", img.vacolor)
                                }
                                if (ele.specified) {
                                    if (l.indexOf('paopacity') != -1) {
                                        ele.paopac = mapzoom.gV(u, "paopacity") / 100
                                    }
                                    if (l.indexOf('pbopacity') != -1) {
                                        ele.pbopac = mapzoom.gV(u, "pbopacity") / 100
                                    }
                                    if (l.indexOf('pacolor') != -1) {
                                        ele.pacolor = mapzoom.gC(u, "pacolor", img.pvacolor)
                                    }
                                    if (l.indexOf('pbcolor') != -1) {
                                        ele.pbcolor = mapzoom.gC(u, "pbcolor", img.pvbcolor)
                                    }
                                }
                                if (ele.shapeform.match(/polyline|line/i) && l.indexOf('vbwidth') != -1) {
                                    ele.vbw = mapzoom.gV(u, "vbwidth") / 100;
                                    ele.paopac = 0;
                                    ele.vaopac = 0
                                }
                                if (l.indexOf('vbcapround') != -1) {
                                    ele.vbc = mapzoom.gA(u, "vbcapround")
                                }
                                if (l.indexOf('vbcapflat') != -1) {
                                    ele.vbc = !mapzoom.gA(u, "vbcapflat")
                                }
                            }
                            if (img.svg) {
                                if (v != null) {
                                    if (ele.shapeform == 'path') {
                                        z = [];
                                        p = mapzoom._splitPath(v);
                                        for (j = 0; j < p.length; j++) {
                                            if (p[j][0].toUpperCase() === "A") {
                                                p[j][1] = gX(p[j][1], 1);
                                                p[j][2] = gY(p[j][2], 1);
                                                p[j][6] = gX(p[j][6], 1);
                                                p[j][7] = gY(p[j][7], 1);
                                                for (i = 8; i < p[j].length; i += 7) {
                                                    p[j][i + 6] = gX(p[j][i + 6], 1);
                                                    p[j][i + 5] = gY(p[j][i + 5], 1);
                                                    p[j][i] = gX(p[j][i], 1);
                                                    p[j][i + 1] = gY(p[j][i + 1], 1)
                                                }
                                            } else {
                                                for (i = 2; i < p[j].length; i += 2) {
                                                    p[j][i - 1] = gX(p[j][i - 1], 1);
                                                    p[j][i] = gY(p[j][i], 1)
                                                }
                                            }
                                        }
                                        for (j = 0; j < p.length; j++) {
                                            z = z.concat(p[j])
                                        }
                                        p = z.join(" ");
                                        ele.setAttribute("d", p)
                                    } else if (ele.shapeform == 'rect') {
                                        ele.setAttribute("x", gX(v[0]));
                                        ele.setAttribute("y", gY(v[1]));
                                        ele.setAttribute("width", gX(v[2] - v[0]));
                                        ele.setAttribute("height", gY(v[3] - v[1]))
                                    } else if (ele.shapeform == 'circle') {
                                        ele.setAttribute("cx", gX(v[0]));
                                        ele.setAttribute("cy", gY(v[1]));
                                        ele.setAttribute("r", gX(v[2]))
                                    } else if (ele.shapeform == 'ellipse') {
                                        ele.setAttribute("cx", gX(v[0]));
                                        ele.setAttribute("cy", gY(v[1]));
                                        ele.setAttribute("rx", gX(v[2]));
                                        ele.setAttribute("ry", gY(v[3]))
                                    } else if (ele.shapeform == 'line') {
                                        ele.setAttribute("x1", gX(v[0]));
                                        ele.setAttribute("y1", gY(v[1]));
                                        ele.setAttribute("x2", gX(v[2]));
                                        ele.setAttribute("y2", gY(v[3]))
                                    } else if (ele.shapeform == 'polyline') {
                                        for (i = 0; i < v.length; i += 2) {
                                            p += gX(v[i]) + ' ' + gY(v[i + 1]) + ' '
                                        }
                                        ele.setAttribute("points", p)
                                    } else {
                                        if (ele.bother && ele.bother.length > 0) {
                                            var sel, m, z, b = ele.bother;
                                            p += 'M ' + gX(v[0]) + ',' + gY(v[1]) + ' L ';
                                            for (i = 2; i < v.length; i += 2) {
                                                p += gX(v[i]) + ' ' + gY(v[i + 1]) + ' '
                                            }
                                            p += 'z ';
                                            for (k = 0; k < b.length; k++) {
                                                sel = document.getElementById(b[k]);
                                                z = null;
                                                z = sel.coords.split(',');
                                                if (sel.shapeform == "rect") {
                                                    p += 'M ' + gX(z[0]) + ' ' + gY(z[1]) + ' L ' + gX(z[0]) + ' ' + gY(z[3]) + ' ' + gX(z[2]) + ' ' + gY(z[3]) + ' ' + gX(z[2]) + ' ' + gY(z[1]) + ' z '
                                                } else if (sel.shapeform == "circle") {
                                                    m = gX(z[2]);
                                                    p += 'M ' + gX(z[0] - z[2]) + ' ' + gY(z[1]) + ' c 0,' + m + ' ' + m + ',' + m + ' ' + m + ',' + m + ' c ' + m + ',0 ' + m + ',-' + m + ' ' + m + ',-' + m + ' c 0,-' + m + ' -' + m + ',-' + m + ' -' + m + ',-' + m + ' c -' + m + ',0 -' + m + ',' + m + ' -' + m + ',' + m + ' z '
                                                } else if (sel.shapeform == "ellipse") {
                                                    m = gX(z[2]);
                                                    n = gY(z[3]);
                                                    p += 'M ' + gX(z[0] - z[2]) + ' ' + gY(z[1]) + ' c 0,' + n + ' ' + m + ',' + n + ' ' + m + ',' + n + ' c ' + m + ',0 ' + m + ',-' + n + ' ' + m + ',-' + n + ' c 0,-' + n + ' -' + m + ',-' + n + ' -' + m + ',-' + n + ' c -' + m + ',0 -' + m + ',' + n + ' -' + m + ',' + n + ' z '
                                                } else if (!sel.shapeform.match(/polyline|line/i)) {
                                                    p += 'M ' + gX(z[0]) + ' ' + gY(z[1]) + ' L ';
                                                    for (i = 2; i < z.length; i += 2) {
                                                        p += gX(z[i]) + ' ' + gY(z[i + 1]) + ' '
                                                    }
                                                    p += 'Z '
                                                }
                                            }
                                            ele.setAttribute("fill-rule", "evenodd");
                                            ele.setAttribute("d", p)
                                        } else {
                                            for (i = 0; i < v.length; i += 2) {
                                                p += gX(v[i]) + ' ' + gY(v[i + 1]) + ' '
                                            }
                                            ele.setAttribute("points", p)
                                        }
                                    }
                                }
                                if (ele.shapeform.match(/polyline|line/i) && l.indexOf('vbdash') != -1) {
                                    p = mapzoom.gV(u, "vbdash") || 0;
                                    ele.vbdash = "";
                                    if (p) {
                                        p = ele.vbc ? img.dsh[p].r : img.dsh[p].a;
                                        for (z = 0; z < p.length; z++) {
                                            ele.vbdash += (p[z] * (ele.vbw * 5) * img.xfactor) + ","
                                        }
                                        if (ele.vbdash.substr(ele.vbdash.length - 1, 1) === ",") {
                                            ele.vbdash = ele.vbdash.slice(0, -1)
                                        }
                                    }
                                }
                                ele.vbdash = ele.vbdash || "0";
                                if (ele.specified) {
                                    ele.setAttribute("style", "stroke-dasharray:" + ele.vbdash + ";stroke-linejoin:" + (ele.vbc ? "round" : "miter") + ";stroke-linecap:" + (ele.vbc ? "round" : "butt") + ";stroke-width:" + (ele.noborder ? 0 : ele.vbw) + "%;stroke:" + ele.pbcolor + ";stroke-opacity:" + ele.pbopac + ";fill:" + ele.pacolor + ";fill-opacity:" + ele.paopac + ";")
                                } else {
                                    ele.setAttribute("style", "stroke-dasharray:" + ele.vbdash + ";stroke-linejoin:" + (ele.vbc ? "round" : "miter") + ";stroke-linecap:" + (ele.vbc ? "round" : "butt") + ";stroke-width:" + (ele.noborder ? 0 : ele.vbw) + "%;stroke:" + ele.vbcolor + ";stroke-opacity:0;fill:" + ele.vacolor + ";fill-opacity:0;")
                                }
                            } else if (img.vml) {
                                if (v != null) {
                                    if (ele.shapeform == 'path') {
                                        z = [];
                                        p = mapzoom._splitPath(v);
                                        ele.path = mapzoom._parsePath(p, img.xfactor, img.yfactor)
                                    } else if (ele.shapeform == 'rect') {
                                        ele.style.left = vX(v[0]) + "px";
                                        ele.style.top = vY(v[1]) + "px";
                                        ele.style.width = vX(v[2] - v[0]) + "px";
                                        ele.style.height = vY(v[3] - v[1]) + "px"
                                    } else if (ele.shapeform == 'circle') {
                                        ele.style.left = vX(v[0] - v[2]) + "px";
                                        ele.style.top = vY(v[1] - v[2]) + "px";
                                        ele.style.width = (vX(v[2]) * 2) + "px";
                                        ele.style.height = (vY(v[2]) * 2) + "px"
                                    } else if (ele.shapeform == 'ellipse') {
                                        ele.style.left = vX(v[0] - v[2]) + "px";
                                        ele.style.top = vY(v[1] - v[3]) + "px";
                                        ele.style.width = (vX(v[2]) * 2) + "px";
                                        ele.style.height = (vY(v[3]) * 2) + "px"
                                    } else if (ele.shapeform == 'line') {
                                        ele.from = vX(v[0]) + ' ' + vY(v[1]);
                                        ele.to = vX(v[2]) + ' ' + vY(v[3])
                                    } else if (ele.shapeform == 'polyline') {
                                        p = "";
                                        for (i = 2; i < v.length; i += 2) {
                                            p += vX(v[i]) + ',' + vY(v[i + 1]) + ' '
                                        }
                                        ele.path = "m " + vX(v[0]) + "," + vY(v[1]) + " l " + p + " e"
                                    } else {
                                        if (ele.bother && ele.bother.length > 0) {
                                            var sel, m, w, v, z, b = ele.bother;
                                            p = "m " + vX(v[0]) + "," + vY(v[1]) + " l ";
                                            for (i = 2; i < v.length; i += 2) {
                                                p += vX(v[i]) + ',' + vY(v[i + 1]) + ' '
                                            }
                                            p += 'x ';
                                            for (k = 0; k < b.length; k++) {
                                                sel = document.getElementById(b[k]);
                                                z = null;
                                                z = sel.coords.split(',');
                                                if (sel.shapeform == "rect") {
                                                    p += 'm ' + vX(z[0]) + ',' + vY(z[1]) + ' l ' + vX(z[0]) + ',' + vY(z[3]) + ',' + vX(z[2]) + ',' + vY(z[3]) + ',' + vX(z[2]) + ',' + vY(z[1]) + ' x '
                                                } else if (sel.shapeform == "circle") {
                                                    w = vX(z[0]);
                                                    v = vX(z[1]);
                                                    m = vX(z[2]);
                                                    p += 'm ' + (w - m) + ',' + (v - m) + ' ar ' + (w - m) + ',' + (v - m) + ',' + (w + m) + ',' + (v + m) + ',' + (w - m) + ',' + v + ',' + (w - m) + ',' + v + ' x '
                                                } else if (sel.shapeform == "ellipse") {
                                                    w = vX(z[0]);
                                                    v = vX(z[1]);
                                                    m = vX(z[2]);
                                                    n = vY(z[3]);
                                                    p += 'm ' + (w - m) + ',' + (v) + ' qy ' + (w) + ',' + (v - n) + ' qx ' + (w + m) + ',' + (v) + ' qy ' + (w) + ',' + (v + n) + ' qx ' + (w - m) + ',' + (v) + ' x '
                                                } else if (!sel.shapeform.match(/polyline|line/i)) {
                                                    p += 'm ' + vX(z[0]) + ',' + vY(z[1]) + ' l ';
                                                    for (i = 2; i < z.length; i += 2) {
                                                        p += vX(z[i]) + ',' + vY(z[i + 1]) + ' '
                                                    }
                                                    p += 'x '
                                                }
                                            }
                                            p += 'e';
                                            ele.path = p
                                        } else {
                                            for (i = 2; i < v.length; i += 2) {
                                                p += vX(v[i]) + ',' + vY(v[i + 1]) + ' '
                                            }
                                            ele.path = "m " + vX(v[0]) + "," + vY(v[1]) + " l " + p + " e"
                                        }
                                    }
                                }
                                if (ele.shapeform.match(/polyline|line/i)) {
                                    if (l.indexOf('vbdash') != -1) {
                                        ele.vbdash = l.indexOf('vbdash') != -1 ? img.dsh[mapzoom.gV(u, "vbdash")].d : "solid"
                                    }
                                    if (l.indexOf('vbwidth') != -1) {
                                        ele.vbv = (l.indexOf('vbwidth') != -1 ? mapzoom.gV(u, "vbwidth") : 25) / 20;
                                        ele.vbw = ele.vbv
                                    }
                                    p = parseFloat(img.parentNode.width / img.minwidth);
                                    ele.vbw = (ele.vbv * p);
                                    ele.firstChild.weight = ele.vbw + "px";
                                    ele.firstChild.dashstyle = ele.vbdash;
                                    ele.firstChild.color = ele.specified ? ele.pbcolor : ele.vbcolor;
                                    ele.firstChild.endcap = ele.vbc ? "round" : "flat";
                                    ele.firstChild.joinstyle = ele.vbc ? "round" : "miter";
                                    ele.firstChild.opacity = ele.specified ? ele.pbopac : 0
                                } else {
                                    ele.firstChild.color = ele.specified ? ele.pacolor : ele.vacolor;
                                    ele.firstChild.opacity = ele.specified ? ele.paopac : 0
                                }
                            }
                        }
                    }
                }
            }
        }, findpxpos: function (img, la, ln, tp, xw, iw, xh, ih, cb) {
            if (img && la && ln && typeof (img.ctrlid) === "string") {
                function lat2y(lat, h) {
                    return ((lat * -1) + 90) * (h / 180)
                };

                function lng2x(lng, w) {
                    return (lng + 180) * (w / 360)
                };
                tp = tp || "area";
                xw = xw || img.maxwidth;
                iw = iw || img.minwidth;
                xh = xh || img.maxheight;
                ih = ih || img.minheight;
                cb = cb || img.cbox;
                var cby = parseFloat(Math.min(Math.max(-90, cb[0]), 90)),
                    cbx = parseFloat(Math.min(Math.max(-180, cb[1]), 180)),
                    cbh = Math.abs(parseFloat(Math.min(Math.max(-90, cb[2]), 90))) + Math.abs(parseFloat(Math.min(Math.max(-90, cb[0]), 90))),
                    cbw = Math.abs(parseFloat(Math.min(Math.max(-180, cb[3]), 180))) + Math.abs(parseFloat(Math.min(Math.max(-180, cb[1]), 180))),
                    chf = (180 / cbh),
                    cwf = (360 / cbw),
                    cyf = 1 - ((90 + cby) / 180),
                    cxf = (180 + cbx) / 360,
                    vw = xw * cwf,
                    vh = xh * chf,
                    vx = vw * cxf,
                    vy = vh * cyf,
                    xf = xw / iw,
                    yf = xh / ih,
                    x = lng2x(ln, vw),
                    y = lat2y(la, vh),
                    z = tp.toLowerCase() == "area" ? true : false,
                    l, t;
                l = (x - vx) / (z ? xf : 1);
                t = (y - vy) / (z ? yf : 1);
                return {
                    x: l,
                    y: t
                }
            }
            return false
        }, set: function (img, d, v) {
            if (img && typeof (img.ctrlid) === "string") {
                if (d && typeof (v) === "boolean") {
                    switch (d.toLowerCase()) {
                    case 'overview':
                        if (v == false && img.overview == true) {
                            mapzoom.G(img.overid).style.visibility = "hidden"
                        } else if (v == true && img.overview == false) {
                            if (img.parentNode.width > img.minwidth || img.parentNode.height > img.minheight) {
                                mapzoom._setOverview(img);
                                mapzoom.G(img.overid).style.visibility = "visible"
                            } else {
                                mapzoom.G(img.overid).style.visibility = "hidden"
                            }
                        }
                        img.overview = v;
                        break;
                    case 'showcoords':
                        if (v == false && img.showcoords == true) {
                            img.onmousemove = null;
                            mapzoom.G(img.xycoid).style.visibility = "hidden"
                        } else if (v == true && img.showcoords == false && !img.tod) {
                            mapzoom.G(img.xycoid).style.visibility = "visible";
                            img.onmousemove = mapzoom._showCoords
                        }
                        img.showcoords = v;
                        break;
                    case 'relativecoords':
                        if (v == false && img.pixelcoords == true && img.showcoords == true && !img.tod) {
                            img.onmousemove = mapzoom._showCoords
                        } else if (v == true && img.pixelcoords == true && img.showcoords == true && !img.tod) {
                            img.onmousemove = mapzoom._showPixel
                        }
                        img.relativecoords = v;
                        break;
                    case 'pixelcoords':
                        if (v == false && img.pixelcoords == true && img.showcoords == true && !img.tod) {
                            img.onmousemove = mapzoom._showLatLon
                        } else if (v == true && img.pixelcoords == false && img.showcoords == true && !img.tod) {
                            img.onmousemove = mapzoom._showCoords
                        }
                        img.pixelcoords = v;
                        break;
                    case 'percentcoords':
                        if (v == false && img.percentcoords == true && img.showcoords == true && !img.tod) {
                            img.onmousemove = mapzoom._showLatLon
                        } else if (v == true && img.percentcoords == false && img.showcoords == true && !img.tod) {
                            img.onmousemove = mapzoom._showPercent
                        }
                        img.percentcoords = v;
                        break;
                    case 'buttons':
                        if (v == false && img.buttons == true) {
                            mapzoom.G(img.ctrlid).style.visibility = "hidden";
                            mapzoom.G(img.infoid).style.left = '0px'
                        } else if (v == true && img.buttons == false && !img.tod) {
                            mapzoom.G(img.infoid).style.left = '42px';
                            mapzoom.G(img.ctrlid).style.visibility = "visible"
                        }
                        img.buttons = v;
                        break;
                    case 'zoomin':
                        if (!img.nozoom && !img.buttons && (parseInt(img.parentNode.style.width, 10) < img.maxwidth || parseInt(img.parentNode.style.height, 10) < img.maxheight)) {
                            if (v == true) {
                                img.zoomin = true;
                                img.zoomout = false;
                                if (img.gecko) {
                                    img.style.cursor = "-moz-zoom-in"
                                } else if (img.webkit) {
                                    img.style.cursor = "-webkit-zoom-in"
                                } else if (img.trident || img.chakra) {
                                    img.style.cursor = "url('" + img.curpath + "zoom-in.cur'),crosshair"
                                } else {
                                    img.style.cursor = "crosshair"
                                }
                            } else {
                                img.zoomin = false
                            }
                        }
                        break;
                    case 'zoomout':
                        if (!img.nozoom && !img.buttons && (parseInt(img.parentNode.style.width, 10) > img.minwidth || parseInt(img.parentNode.style.height, 10) > img.minheight)) {
                            if (v == true) {
                                img.zoomout = true;
                                img.zoomin = false;
                                if (img.gecko) {
                                    img.style.cursor = "-moz-zoom-out"
                                } else if (img.webkit) {
                                    img.style.cursor = "-webkit-zoom-out"
                                } else if (img.trident || img.chakra) {
                                    img.style.cursor = "url('" + img.curpath + "zoom-out.cur'),crosshair"
                                } else {
                                    img.style.cursor = "crosshair"
                                }
                            } else {
                                img.zoomout = false
                            }
                        }
                        break;
                    case 'nozoom':
                        img.nozoom = v;
                        break
                    }
                }
            }
            return false
        }, get: function (img, d) {
            if (img && d && typeof (img.ctrlid) === "string") {
                if (d.toLowerCase() == "maxzoomx") {
                    return img.xfactor
                } else if (d.toLowerCase() == "maxzoomy") {
                    return img.yfactor
                } else if (d.toLowerCase() == "maxwidth") {
                    return img.maxwidth
                } else if (d.toLowerCase() == "maxheight") {
                    return img.maxheight
                } else if (d.toLowerCase() == "playing") {
                    return img.automode
                } else if (d.toLowerCase() == "vectorsupport") {
                    return (img.svg || img.vml ? true : false)
                } else if (d.toLowerCase() == "currentxyz") {
                    var q = parseFloat((img.parentNode.width - img.minwidth) / (img.maxwidth - img.minwidth)),
                        z = Math.min(Math.max(q * 100, 0), 100) || 0;
                    var x = Math.min(Math.max(((Math.abs(parseFloat(img.parentNode.style.left)) / ((img.maxwidth - img.minwidth) * q)) * 100), 0), 100) || 0;
                    var y = Math.min(Math.max(((Math.abs(parseFloat(img.parentNode.style.top)) / ((img.maxheight - img.minheight) * q)) * 100), 0), 100) || 0;
                    return {
                        x: x,
                        y: y,
                        z: z
                    }
                }
            }
            return false
        }, gA: function (c, s) {
            var k, t = 0,
                p = s.length;
            for (k = 0; k < c.length; k++) {
                if (c[k].indexOf(s) == 0) {
                    t = 1;
                    break
                }
            }
            return t
        }, gC: function (c, s, l) {
            var k, t, v = l,
                p = s.length;
            for (k = 0; k < c.length; k++) {
                if (c[k].indexOf(s) == 0) {
                    t = c[k].substring(p);
                    v = t.toLowerCase();
                    break
                }
            }
            return v.match(/^[0-9a-f]{6}$/i) ? '#' + v : '#000000'
        }, gV: function (c, s) {
            var k, t = 0,
                p = s.length;
            for (k = 0; k < c.length; k++) {
                if (c[k].indexOf(s) == 0) {
                    t = Math.min(c[k].substring(p), 100);
                    break
                }
            }
            return Math.max(0, t)
        }, G: function (v) {
            return (document.getElementById(v))
        }, E: function (v) {
            return (document.createElement(v))
        }, L: function (s, v) {
            s = s != "" ? s.toLowerCase() : 'log';
            if (window.opera && window.opera.postError) {
                window.opera.postError(s.toUpperCase() + ': ' + v)
            } else if (window.console) {
                if (!window.console[s]) {
                    window.console.log(s + ': ' + v)
                } else {
                    window.console[s](v)
                }
            } else {
                window.document.title = s.toUpperCase() + ': ' + v
            }
            return false
        }, A: function (e, v, f) {
            if (e.attachEvent) {
                e.attachEvent("on" + v, function () {
                    f.call(e)
                })
            } else if (e.addEventListener) {
                e.addEventListener(v, f, false)
            } else {
                var old = e["on" + v];
                if (typeof old !== 'function') {
                    e["on" + v] = function () {
                        f.call(e)
                    }
                } else {
                    e["on" + v] = function () {
                        old();
                        f.call(e)
                    }
                }
            }
            return false
        }, R: function (e, v, f) {
            if (e.detachEvent) {
                e.detachEvent("on" + v, function () {
                    f.call(e)
                })
            } else if (e.removeEventListener) {
                e.removeEventListener(v, f, false)
            } else {
                e["on" + v] = ""
            }
            return false
        }, P: function (e, o) {
            if (e && o && o.href) {
                if (o.href != "" && o.href != "nothing") {
                    if (o.href.match(/javascript\:/i)) {
                        e.jac = o.href.substr(o.href.indexOf(":") + 1)
                    } else {
                        if (o.href != location.href && o.href != location.href + '#') {
                            e.url = o.href;
                            if (o.target != "" && o.target != "_self") {
                                e.trg = o.target
                            }
                        }
                    }
                }
            }
        }, _splitPath: function (s) {
            var c = s.replace(/[ ]*[, ][ ]*/g, ' ').replace(/([a-zA-Z])([^a-zA-Z]*)/g, '["$1"$2],').replace(/([-+]?[0-9]*\.?[0-9]+)/g, ',$1').replace(/^(.*)$/, '[$1[""]]');
            try {
                c = eval(c);
                c.length = c.length - 1;
                return c
            } catch (e) {
                return []
            }
        }, _parsePath: function (d, xf, yf) {
            function vX(v) {
                var t = parseInt(xfactor * v * 10, 10);
                return isNaN(t) ? 0 : t
            };

            function vY(v) {
                var t = parseInt(yfactor * v * 10, 10);
                return isNaN(t) ? 0 : t
            };

            function moveToA(a) {
                if (a.length < 3) {
                    return false
                }
                p += " m " + vX(a[1]) + "," + vY(a[2]);
                if (a.length > 3) {
                    for (var i = 4; i < a.length; i += 2) {
                        p += " l " + vX(a[i - 1]) + "," + vY(a[i])
                    }
                    lx = a[i - 3];
                    ly = a[i - 2]
                } else {
                    lx = a[1];
                    ly = a[2]
                }
                cx = "n/a";
                cy = "n/a"
            };

            function moveToR(a) {
                if (a.length < 3) {
                    return false
                }
                lx += a[1];
                ly += a[2];
                p += " m " + lx + "," + ly;
                if (a.length > 3) {
                    for (var i = 4; i < a.length; i += 2) {
                        lx += a[i - 1];
                        ly += a[i];
                        p += " l " + vX(lx) + "," + vY(ly)
                    }
                }
                cx = "n/a";
                cy = "n/a"
            };

            function lineToA(a) {
                if (a.length < 3) {
                    return false
                }
                for (var i = 2; i < a.length; i += 2) {
                    p += " l " + vX(a[i - 1]) + "," + vY(a[i])
                }
                lx = a[i - 3];
                ly = a[i - 2];
                cx = "n/a";
                cy = "n/a"
            };

            function lineToR(a) {
                if (a.length < 3) {
                    return false
                }
                for (var i = 2; i < a.length; i += 2) {
                    lx += a[i - 1];
                    ly += a[i];
                    p += " l " + vX(lx) + "," + vY(ly)
                }
                cx = "n/a";
                cy = "n/a"
            };

            function quadraticCurveToA(a) {
                if (a.length < 5) {
                    return false
                }
                for (var i = 4; i < a.length; i += 4) {
                    p += " qb " + vX(a[i - 3]) + "," + vY(a[i - 2]) + "," + vX(a[i - 1]) + "," + vY(a[i])
                }
                cx = a[i - 7];
                cy = a[i - 6];
                lx = a[i - 5];
                ly = a[i - 4]
            };

            function quadraticCurveToR(a) {
                if (a.length < 5) {
                    return false
                }
                for (var i = 4; i < a.length; i += 4) {
                    cx = lx + a[i - 3];
                    cy = ly + a[i - 2];
                    lx += a[i - 1];
                    ly += a[i];
                    p += " qb " + vX(cx) + "," + vY(cy) + "," + vX(lx) + "," + vY(ly)
                }
            };

            function smoothQCurveToA(a) {
                if (a.length < 3) {
                    return false
                }
                var x1, y1;
                if (cx != "n/a" && cy != "n/a") {
                    x1 = lx - (cx - lx);
                    y1 = ly - (cy - ly)
                } else {
                    x1 = lx;
                    y1 = ly
                }
                for (var i = 2; i < a.length; i += 2) {
                    p += " qb " + vX(x1) + "," + vY(y1) + "," + vX(a[i - 1]) + "," + vY(a[i]);
                    x1 = a[i - 1] - (x1 - a[i - 1]);
                    y1 = a[i] - (y1 - a[i])
                }
                lx = a[i - 3];
                ly = a[i - 2]
            };

            function smoothQCurveToR(a) {
                if (a.length < 3) {
                    return false
                }
                var i, x1, y1;
                if (cx != "n/a" && cy != "n/a") {
                    x1 = lx - (cx - lx);
                    y1 = ly - (cy - ly)
                } else {
                    x1 = lx;
                    y1 = ly
                }
                for (i = 2; i < a.length; i += 2) {
                    lx += a[i - 1];
                    ly += a[i];
                    p += " qb " + vX(x1) + "," + vY(y1) + "," + vX(lx) + "," + vY(ly);
                    x1 = lx - (x1 - lx);
                    y1 = ly - (y1 - ly)
                }
            };

            function bezierCurveToA(a) {
                if (a.length < 7) {
                    return false
                }
                for (var i = 6; i < a.length; i += 6) {
                    p += " c " + vX(a[i - 5]) + "," + vY(a[i - 4]) + "," + vX(a[i - 3]) + "," + vY(a[i - 2]) + "," + vX(a[i - 1]) + "," + vY(a[i])
                }
                cx = a[i - 9];
                cy = a[i - 8];
                lx = a[i - 7];
                ly = a[i - 6]
            };

            function bezierCurveToR(a) {
                var i, bx, by;
                if (a.length < 7) {
                    return false
                }
                for (i = 6; i < a.length; i += 6) {
                    bx = lx + a[i - 5];
                    by = ly + a[i - 4];
                    cx = lx + a[i - 3];
                    cy = ly + a[i - 2];
                    lx += a[i - 1];
                    ly += a[i];
                    p += " c " + vX(bx) + "," + vY(by) + "," + vX(cx) + "," + vY(cy) + "," + vX(lx) + "," + vY(ly)
                }
            };

            function smoothBCurveToA(a) {
                if (a.length < 5) {
                    return false
                }
                var i, x1, y1;
                if (cx != "n/a" && cy != "n/a") {
                    x1 = lx - (cx - lx);
                    y1 = ly - (cy - ly)
                } else {
                    x1 = a[1];
                    y1 = a[2]
                }
                for (i = 4; i < a.length; i += 4) {
                    p += " c " + vX(x1) + "," + vY(y1) + "," + vX(a[i - 3]) + "," + vY(a[i - 2]) + "," + vX(a[i - 1]) + "," + vY(a[i]);
                    x1 = a[i - 1] - (a[i - 3] - a[i - 1]);
                    y1 = a[i] - (a[i - 2] - a[i])
                }
                cx = a[i - 7];
                cy = a[i - 6];
                lx = a[i - 5];
                ly = a[i - 4]
            };

            function smoothBCurveToR(a) {
                if (a.length < 5) {
                    return false
                }
                var i, x1, y1;
                if (cx != "n/a" && cy != "n/a") {
                    x1 = lx - (cx - lx);
                    y1 = ly - (cy - ly)
                } else {
                    x1 = lx + a[1];
                    y1 = ly + a[2]
                }
                for (i = 4; i < a.length; i += 4) {
                    cx = lx + a[i - 3];
                    cy = ly + a[i - 2];
                    lx += a[i - 1];
                    ly += a[i];
                    p += " c " + vX(x1) + "," + vY(y1) + "," + vX(cx, 10) + "," + vY(cy) + "," + vX(lx) + "," + vY(ly);
                    x1 = lx - (x1 - lx);
                    y1 = ly - (y1 - ly)
                }
            };

            function ellipticalArcTo(a, rel) {
                if (a.length >= 7) {
                    var ox = rel ? lx : 0,
                        oy = rel ? ly : 0,
                        tx = a[a.length - 2],
                        ty = a[a.length - 1];
                    p += " l " + vX(tx + ox) + "," + vY(ty + oy)
                }
            }
            if (d && d.length && d.length > 0) {
                var xfactor = xf || 1,
                    yfactor = yf || 1,
                    i = 0,
                    cx = 0,
                    cy = 0,
                    lx = 0,
                    ly = 0,
                    p = "",
                    ar = [];
                for (i = 0; i < d.length; i++) {
                    ar = d[i];
                    switch (ar[0]) {
                    case "M":
                        moveToA(ar);
                        break;
                    case "m":
                        moveToR(ar);
                        break;
                    case "L":
                        lineToA(ar);
                        break;
                    case "l":
                        lineToR(ar);
                        break;
                    case "H":
                        p += " l " + vX(ar[1]) + "," + ly;
                        lx = vX(ar[1]);
                        cx = "n/a";
                        cy = "n/a";
                        break;
                    case "h":
                        lx += vX(ar[1]);
                        p += " l " + lx + "," + ly;
                        cx = "n/a";
                        cy = "n/a";
                        break;
                    case "V":
                        p += " l " + lx + "," + vY(ar[1]);
                        ly = vY(ar[1]);
                        cx = "n/a";
                        cy = "n/a";
                        break;
                    case "v":
                        ly += vY(ar[1]);
                        p += " l " + lx + "," + ly;
                        cx = "n/a";
                        cy = "n/a";
                        break;
                    case "C":
                        bezierCurveToA(ar);
                        break;
                    case "c":
                        bezierCurveToR(ar);
                        break;
                    case "S":
                        smoothBCurveToA(ar);
                        break;
                    case "s":
                        smoothBCurveToR(ar);
                        break;
                    case "Q":
                        quadraticCurveToA(ar);
                        break;
                    case "q":
                        quadraticCurveToR(ar);
                        break;
                    case "T":
                        smoothQCurveToA(ar);
                        break;
                    case "t":
                        smoothQCurveToR(ar);
                        break;
                    case "A":
                        ellipticalArcTo(ar, false);
                        break;
                    case "a":
                        ellipticalArcTo(ar, true);
                        break;
                    case "Z":
                    case "z":
                        p += " x";
                        cx = "n/a";
                        cy = "n/a";
                        break
                    }
                }
                return p
            }
            return false
        }, _onVectorDown: function (e) {
            var ele = "",
                dt = new Date();
            e = e ? e : window.event;
            if (e.target) {
                ele = e.target
            } else if (e.srcElement) {
                ele = e.srcElement
            }
            ele.xpos = e.screenX;
            ele.ypos = e.screenY;
            ele.butt = ele.sys == "svg" ? (e.button == 0 ? 1 : 0) || 0 : (e.button == 1 ? 1 : 0) || 0;
            ele.stop = dt.getMilliseconds() + dt.getSeconds() * 1000
        }, _onVectorUp: function (e) {
            var ele = "",
                dt = new Date(),
                b, p, t;
            e = e ? e : window.event;
            if (e.target) {
                ele = e.target
            } else if (e.srcElement) {
                ele = e.srcElement
            }
            b = ele.butt;
            p = ele.xpos == e.screenX && ele.ypos == e.screenY ? 1 : 0;
            t = ((dt.getMilliseconds() + dt.getSeconds() * 1000) - ele.stop) < 250 ? 1 : 0;
            if ((ele.url || ele.jac) && b && p && t) {
                if (ele.jac) {
                    var fn = new Function(ele.jac);
                    fn()
                } else if (ele.url) {
                    if (ele.trg) {
                        window.open(ele.url, ele.trg)
                    } else {
                        window.location.href = ele.url
                    }
                }
            }
        }, _onVMLOver: function (ele) {
            if (ele) {
                var i, obj, k = ele.shapeform && ele.shapeform.match(/polyline|line/i) ? 1 : 0;
                if (k) {
                    ele.firstChild.color = ele.vbcolor;
                    ele.firstChild.opacity = ele.vbopac
                } else {
                    ele.firstChild.color = ele.vacolor;
                    ele.firstChild.opacity = ele.vaopac
                } if (ele.other && ele.other.length > 0) {
                    for (i = 0; i < ele.other.length; i++) {
                        obj = document.getElementById(ele.other[i]);
                        k = obj.shapeform && obj.shapeform.match(/polyline|line/i) ? 1 : 0;
                        if (k) {
                            obj.firstChild.color = ele.forcegroup ? ele.vbcolor || obj.vbcolor : obj.vbcolor;
                            obj.firstChild.opacity = ele.forcegroup ? ele.vbopac || obj.vbopac : obj.vbopac
                        } else {
                            obj.firstChild.color = ele.forcegroup ? ele.vacolor : obj.vacolor;
                            obj.firstChild.opacity = ele.forcegroup ? ele.vaopac : obj.vaopac
                        }
                    }
                }
            }
        }, _onVMLOut: function (ele) {
            if (ele) {
                var i, obj, k = ele.shapeform && ele.shapeform.match(/polyline|line/i) ? 1 : 0;
                if (ele.specified) {
                    if (k) {
                        ele.firstChild.opacity = ele.pbopac || ele.vbopac;
                        ele.firstChild.color = ele.pbcolor || ele.vbcolor
                    } else {
                        ele.firstChild.opacity = ele.paopac;
                        ele.firstChild.color = ele.pacolor
                    } if (ele.other && ele.other.length > 0) {
                        for (i = 0; i < ele.other.length; i++) {
                            obj = document.getElementById(ele.other[i]);
                            k = obj.shapeform && obj.shapeform.match(/polyline|line/i) ? 1 : 0;
                            if (k) {
                                obj.firstChild.opacity = (obj.specified ? obj.pbopac || ele.pbopac : 0);
                                obj.firstChild.color = (obj.specified ? obj.pbcolor || ele.pbcolor : obj.vbcolor)
                            } else {
                                obj.firstChild.opacity = (obj.specified ? obj.paopac || ele.paopac : 0);
                                obj.firstChild.color = (obj.specified ? obj.pacolor || ele.pacolor : obj.vacolor)
                            }
                        }
                    }
                } else {
                    ele.firstChild.opacity = 0;
                    if (ele.other && ele.other.length > 0) {
                        for (i = 0; i < ele.other.length; i++) {
                            obj = document.getElementById(ele.other[i]);
                            k = obj.shapeform && obj.shapeform.match(/polyline|line/i) ? 1 : 0;
                            if (obj.specified) {
                                if (k) {
                                    obj.firstChild.opacity = obj.pbopac || ele.pbopac;
                                    obj.firstChild.color = obj.pbcolor || ele.pbcolor
                                } else {
                                    obj.firstChild.opacity = obj.paopac || ele.paopac;
                                    obj.firstChild.color = obj.pacolor || ele.pacolor
                                }
                            } else {
                                obj.firstChild.opacity = 0
                            }
                        }
                    }
                }
            }
        }, _onSVGOver: function (ele) {
            if (ele) {
                var i, t = 0,
                    obj;
                if (document.contentType) {
                    ele.style.cssText = "stroke-dasharray:" + ele.vbdash + ";stroke-linejoin:" + (ele.vbc ? "round" : "miter") + ";stroke-linecap:" + (ele.vbc ? "round" : "butt") + ";fill-opacity:" + (ele.fading && !ele.specified && !document.contentType ? 0 : ele.vaopac) + ";fill:" + ele.vacolor + ";stroke:" + ele.vbcolor + ";stroke-opacity:" + (!ele.specified ? 0 : ele.vbopac) + ";stroke-width:" + (ele.noborder ? 0 : ele.vbw) + "%;";
                    if (ele.other && ele.other.length > 0) {
                        for (i = 0; i < ele.other.length; i++) {
                            obj = document.getElementById(ele.other[i]);
                            // obj.style.cssText = "stroke-dasharray:" + obj.vbdash + ";stroke-linejoin:" + (obj.vbc ? "round" : "miter") + ";stroke-linecap:" + (obj.vbc ? "round" : "butt") + ";fill-opacity:" + (ele.fading && !ele.specified && !document.contentType ? 0 : ele.forcegroup ? ele.vaopac : obj.vaopac) + ";fill:" + (ele.forcegroup ? ele.vacolor : obj.vacolor) + ";stroke:" + (ele.forcegroup ? ele.vbcolor : obj.vbcolor) + ";stroke-opacity:" + (ele.fading && !ele.specified && !document.contentType ? 0 : ele.forcegroup ? ele.vbopac : obj.vbopac) + ";stroke-width:" + (ele.noborder ? 0 : obj.vbw) + "%;"
                        }
                    }
                } else {
                    ele.style.fillOpacity = ele.fading && !ele.specified && !document.contentType ? 0 : ele.vaopac;
                    ele.style.strokeOpacity = ele.fading && !ele.specified && !document.contentType ? 0 : ele.vbopac;
                    ele.style.fill = ele.vacolor;
                    ele.style.stroke = ele.vbcolor;
                    ele.style.strokeWidth = (ele.noborder ? 0 : ele.vbw) + '%';
                    if (ele.other && ele.other.length > 0) {
                        for (i = 0; i < ele.other.length; i++) {
                            obj = document.getElementById(ele.other[i]);
                            obj.style.fillOpacity = ele.fading && !ele.specified && !document.contentType ? 0 : ele.forcegroup ? ele.vaopac : obj.vaopac;
                            obj.style.strokeOpacity = ele.fading && !ele.specified && !document.contentType ? 0 : ele.forcegroup ? ele.vbopac : obj.vbopac;
                            obj.style.fill = ele.forcegroup ? ele.vacolor : obj.vacolor;
                            obj.style.stroke = ele.forcegroup ? ele.vbcolor : obj.vbcolor;
                            obj.style.strokeWidth = (obj.noborder ? 0 : ele.vbw) + '%;'
                        }
                    }
                    if (ele.fading && !ele.specified) {
                        mapzoom._fadeSVGIn(ele.id, t)
                    }
                }
            }
        }, _onSVGOut: function (ele) {
            if (ele) {
                var i, t = 10,
                    obj;
                if (document.contentType) {
                    if (ele.specified) {
                        ele.style.cssText = "stroke-dasharray:" + ele.vbdash + ";stroke-linejoin:" + (ele.vbc ? "round" : "miter") + ";stroke-linecap:" + (ele.vbc ? "round" : "butt") + ";fill-opacity:" + ele.paopac + ";fill:" + ele.pacolor + ";stroke:" + ele.pbcolor + ";stroke-opacity:" + ele.pbopac + ";stroke-width:" + (ele.noborder ? 0 : ele.vbw) + "%;";
                        if (ele.other && ele.other.length > 0) {
                            for (i = 0; i < ele.other.length; i++) {
                                obj = document.getElementById(ele.other[i]);
                                obj.style.cssText = "stroke-dasharray:" + obj.vbdash + ";stroke-linejoin:" + (obj.vbc ? "round" : "miter") + ";stroke-linecap:" + (obj.vbc ? "round" : "butt") + ";fill-opacity:" + (obj.specified ? obj.paopac || ele.paopac : 0) + ";fill:" + (obj.specified ? obj.pacolor || ele.pacolor : obj.vacolor) + ";stroke:" + (obj.specified ? obj.pbcolor || ele.pbcolor : obj.vbcolor) + ";stroke-opacity:" + (obj.specified ? obj.pbopac || ele.pbopac : 0) + ";stroke-width:" + ((obj.specified && (obj.noborder || ele.noborder)) || (!obj.specified && obj.noborder) ? 0 : obj.vbw) + "%;"
                            }
                        }
                    } else {
                        ele.style.cssText = "stroke-dasharray:" + ele.vbdash + ";stroke-linejoin:" + (ele.vbc ? "round" : "miter") + ";stroke-linecap:" + (ele.vbc ? "round" : "butt") + ";stroke:" + ele.pbcolor + ";stroke-opacity:0;fill:" + ele.pacolor + ";fill-opacity:0;stroke-width:" + (ele.noborder ? 0 : ele.vbw) + "%;";
                        if (ele.other && ele.other.length > 0) {
                            for (i = 0; i < ele.other.length; i++) {
                                obj = document.getElementById(ele.other[i]);
                                if (obj.specified) {
                                    obj.style.cssText = "stroke-dasharray:" + obj.vbdash + ";stroke-linejoin:" + (obj.vbc ? "round" : "miter") + ";stroke-linecap:" + (obj.vbc ? "round" : "butt") + ";stroke:" + (obj.pbcolor || ele.pbcolor) + ";stroke-opacity:" + (obj.pbopac || ele.pbopac) + ";fill:" + (obj.pacolor || ele.pacolor) + ";fill-opacity:" + (obj.paopac || ele.paopac) + ";stroke-width:" + (obj.noborder || ele.noborder ? 0 : obj.vbw) + "%;"
                                } else {
                                    obj.style.cssText = "stroke-dasharray:" + obj.vbdash + ";stroke-linejoin:" + (obj.vbc ? "round" : "miter") + ";stroke-linecap:" + (obj.vbc ? "round" : "butt") + ";stroke:" + (ele.forcegroup ? ele.vbcolor : obj.vbcolor) + ";stroke-opacity:0;fill:" + (ele.forcegroup ? ele.vacolor : obj.vacolor) + ";fill-opacity:0;stroke-width:" + ((ele.forcegroup ? ele.noborder : obj.noborder) ? 0 : obj.vbw) + "%;"
                                }
                            }
                        }
                    }
                } else {
                    if (ele.specified) {
                        ele.style.fillOpacity = ele.paopac;
                        ele.style.strokeOpacity = ele.pbopac;
                        ele.style.fill = ele.pacolor;
                        ele.style.stroke = ele.pbcolor;
                        ele.style.strokeWidth = (ele.noborder ? 0 : 1) + 'px;';
                        if (ele.other && ele.other.length > 0) {
                            for (i = 0; i < ele.other.length; i++) {
                                obj = document.getElementById(ele.other[i]);
                                obj.style.fillOpacity = (obj.specified ? obj.paopac || ele.paopac : 0);
                                obj.style.strokeOpacity = (obj.specified ? obj.pbopac || ele.pbopac : 0);
                                obj.style.fill = (obj.specified ? obj.pacolor || ele.pacolor : obj.vacolor);
                                obj.style.stroke = (obj.specified ? obj.pbcolor || ele.pbcolor : obj.vbcolor);
                                obj.style.strokeWidth = ((obj.specified && (obj.noborder || ele.noborder)) || (!obj.specified && obj.noborder) ? 0 : 1) + 'px;'
                            }
                        }
                    } else {
                        if (ele.fading) {
                            mapzoom._fadeSVGOut(ele.id, t)
                        } else {
                            ele.style.fillOpacity = 0;
                            ele.style.strokeOpacity = 0;
                            ele.style.fill = ele.vacolor;
                            ele.style.stroke = ele.vbcolor;
                            ele.style.strokeWidth = (ele.noborder ? 0 : 1) + 'px;';
                            if (ele.other && ele.other.length > 0) {
                                for (i = 0; i < ele.other.length; i++) {
                                    obj = document.getElementById(ele.other[i]);
                                    if (obj.specified) {
                                        obj.style.fillOpacity = (obj.paopac || ele.paopac);
                                        obj.style.strokeOpacity = (obj.pbopac || ele.pbopac);
                                        obj.style.fill = (obj.pacolor || ele.pacolor);
                                        obj.style.stroke = (obj.pbcolor || ele.pbcolor);
                                        obj.style.strokeWidth = (obj.noborder || ele.noborder ? 0 : 1) + 'px;'
                                    } else {
                                        obj.style.fillOpacity = 0;
                                        obj.style.strokeOpacity = 0;
                                        obj.style.fill = (ele.forcegroup ? ele.vacolor : obj.vacolor);
                                        obj.style.stroke = (ele.forcegroup ? ele.vbcolor : obj.vbcolor);
                                        obj.style.strokeWidth = ((ele.forcegroup ? ele.noborder : obj.noborder) ? 0 : 1) + 'px;'
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }, _fadeSVGOut: function (id, c) {
            var i, t = 10,
                obj, ele = mapzoom.G(id);
            if (c > 0) {
                ele.style.fillOpacity = (ele.vaopac / t) * c;
                ele.style.strokeOpacity = (ele.vbopac / t) * c;
                if (ele.other && ele.other.length > 0) {
                    for (i = 0; i < ele.other.length; i++) {
                        obj = document.getElementById(ele.other[i]);
                        obj.style.fillOpacity = ((ele.forcegroup ? ele.vaopac : obj.vaopac) / t) * c;
                        obj.style.strokeOpacity = ((ele.forcegroup ? ele.vbopac : obj.vbopac) / t) * c
                    }
                }
                c--;
                window.setTimeout("mapzoom._fadeSVGOut('" + id + "'," + c + ")", 30)
            } else {
                ele.style.fillOpacity = 0;
                ele.style.strokeOpacity = 0;
                if (ele.other && ele.other.length > 0) {
                    for (i = 0; i < ele.other.length; i++) {
                        obj = document.getElementById(ele.other[i]);
                        if (obj.specified) {
                            obj.style.fillOpacity = (obj.paopac || ele.paopac);
                            obj.style.strokeOpacity = (obj.pbopac || ele.pbopac);
                            obj.style.fill = (obj.pacolor || ele.pacolor);
                            obj.style.stroke = (obj.pbcolor || ele.pbcolor);
                            obj.style.strokeWidth = ((obj.specified && (obj.noborder || ele.noborder)) || (!obj.specified && obj.noborder) ? 0 : ele.vbw) + '%;'
                        } else {
                            obj.style.fillOpacity = 0;
                            obj.style.strokeOpacity = 0
                        }
                    }
                }
            }
            return false
        }, _fadeSVGIn: function (id, c) {
            var i, t = 10,
                obj, ele = mapzoom.G(id);
            if (c < t) {
                ele.style.fillOpacity = (ele.vaopac / t) * c;
                ele.style.strokeOpacity = (ele.vbopac / t) * c;
                if (ele.other && ele.other.length > 0) {
                    for (i = 0; i < ele.other.length; i++) {
                        obj = document.getElementById(ele.other[i]);
                        obj.style.fillOpacity = ((ele.forcegroup ? ele.vaopac : obj.vaopac) / t) * c;
                        obj.style.strokeOpacity = ((ele.forcegroup ? ele.vbopac : obj.vbopac) / t) * c
                    }
                }
                c++;
                window.setTimeout("mapzoom._fadeSVGIn('" + id + "'," + c + ")", 30)
            } else {
                ele.style.fillOpacity = ele.vaopac;
                ele.style.strokeOpacity = ele.vbopac;
                if (ele.other && ele.other.length > 0) {
                    for (i = 0; i < ele.other.length; i++) {
                        obj = document.getElementById(ele.other[i]);
                        obj.style.strokeOpacity = (ele.forcegroup ? ele.vbopac : obj.vbpac);
                        obj.style.fillOpacity = (ele.forcegroup ? ele.vaopac : obj.vaopac)
                    }
                }
            }
            return false
        }, _next: function (img) {
            if (img && typeof (img.ctrlid) === "string") {
                if (img.automode) {
                    if (img.autoloop && img.cpos < (img.step.length - 1)) {
                        img.cpos = img.cpos + 1
                    } else if (img.autoloop && img.cpos >= (img.step.length - 1)) {
                        img.cpos = 0
                    } else if (!img.autoloop && img.cpos < (img.step.length - 1)) {
                        img.cpos = img.cpos + 1
                    } else {
                        img.cpos = img.step.length
                    } if (img.cpos < img.step.length) {
                        mapzoom.kenburns(mapzoom.G(img.id), img.step[img.cpos])
                    } else {
                        mapzoom.stop(img)
                    }
                }
            }
            return false
        }, _setOverview: function (img) {
            var view = mapzoom.G(img.viewid);
            view.style.width = (Math.round((img.ovsfact * img.minwidth) / (img.parentNode.width / img.minwidth)) - (img.bmode ? 0 : 2)) + 'px';
            view.style.height = (Math.round((img.ovsfact * img.minheight) / (img.parentNode.height / img.minheight)) - (img.bmode ? 0 : 2)) + 'px';
            view.style.left = Math.round((Math.abs(img.parentNode.left) / (img.parentNode.width / img.minwidth)) * img.ovsfact) - (img.bmode ? 2 : 0) + 'px';
            view.style.top = Math.round((Math.abs(img.parentNode.top) / (img.parentNode.height / img.minheight)) * img.ovsfact) - (img.bmode ? 2 : 0) + 'px';
            view.maxleft = (img.minwidth * img.ovsfact) - (img.bmode ? 0 : 2) - parseInt(view.style.width, 10);
            view.maxtop = (img.minheight * img.ovsfact) - (img.bmode ? 0 : 2) - parseInt(view.style.height, 10);
            return false
        }, _findPosXY: function (ele) {
            var t, d = {
                x: ele.offsetLeft,
                y: ele.offsetTop
            };
            if (ele.offsetParent) {
                t = mapzoom._findPosXY(ele.offsetParent);
                d.x += t.x;
                d.y += t.y
            }
            return d
        }, _getMousePos: function (ex, ey, px, py) {
            var ox, oy, k = {
                ox: 0,
                oy: 0,
                ex: ex,
                ey: ey
            };
            if (self.pageXOffset || self.pageYOffset) {
                ox = self.pageXOffset;
                if (ox > 0 && px == ex) {
                    ex -= ox
                }
                oy = self.pageYOffset;
                if (oy > 0 && py == ey) {
                    ey -= oy
                }
            } else if (document.documentElement) {
                ox = document.documentElement.scrollLeft;
                oy = document.documentElement.scrollTop
            } else if (document.body) {
                ox = document.body.scrollLeft;
                oy = document.body.scrollTop
            }
            k.ox = ox;
            k.oy = oy;
            k.ex = ex;
            k.ey = ey;
            return k
        }, _showCoords: function (e) {
            if (cvi_mzactive != null) {
                var k, t, x, y, ex, ey, px = 0,
                    py = 0,
                    o = mapzoom.G(cvi_mzactive),
                    w = o.parentNode.width,
                    h = o.parentNode.height;
                e = e ? e : window.event;
                ex = e.clientX;
                ey = e.clientY;
                if (e.pageX || e.pageY) {
                    px = e.pageX;
                    py = e.pageY
                }
                k = mapzoom._getMousePos(ex, ey, px, py);
                t = mapzoom._findPosXY(o);
                x = Math.min(Math.max(k.ex + k.ox - t.x, 0), w);
                y = Math.min(Math.max(k.ey + k.oy - t.y, 0), h);
                mapzoom.G(o.cposid).innerHTML = '<span>x:' + x + ' y:' + y + '<\/span>'
            }
            return false
        }, _showPixel: function (e) {
            if (cvi_mzactive != null) {
                var k, t, x, y, z, ex, ey, px = 0,
                    py = 0,
                    o = mapzoom.G(cvi_mzactive),
                    w = o.parentNode.width,
                    h = o.parentNode.height;
                e = e ? e : window.event;
                ex = e.clientX;
                ey = e.clientY;
                if (e.pageX || e.pageY) {
                    px = e.pageX;
                    py = e.pageY
                }
                k = mapzoom._getMousePos(ex, ey, px, py);
                t = mapzoom._findPosXY(o);
                z = (o.minwidth / w) * o.xfactor;
                x = parseInt((Math.min(Math.max(k.ex + k.ox - t.x, 0), w) * z), 10);
                y = parseInt((Math.min(Math.max(k.ey + k.oy - t.y, 0), h) * z), 10);
                mapzoom.G(o.cposid).innerHTML = '<span>x:' + x + ' y:' + y + '<\/span>'
            }
            return false
        }, _showPercent: function (e) {
            if (cvi_mzactive != null) {
                var k, t, x, y, z, ex, ey, px = 0,
                    py = 0,
                    na = !Number.prototype.toFixed ? 0 : 1,
                    o = mapzoom.G(cvi_mzactive),
                    w = o.parentNode.width,
                    h = o.parentNode.height;
                e = e ? e : window.event;
                ex = e.clientX;
                ey = e.clientY;
                if (e.pageX || e.pageY) {
                    px = e.pageX;
                    py = e.pageY
                }
                k = mapzoom._getMousePos(ex, ey, px, py);
                t = mapzoom._findPosXY(o);
                x = parseFloat((Math.min(Math.max(k.ex + k.ox - t.x, 0.0), w) / w) * 100);
                x = na ? x.toFixed(2) : parseInt(x);
                y = parseFloat((Math.min(Math.max(k.ey + k.oy - t.y, 0.0), h) / h) * 100);
                y = na ? y.toFixed(2) : parseInt(y);
                z = parseFloat(((w - o.minwidth) / (o.maxwidth - o.minwidth)) * 100);
                z = na ? z.toFixed(2) : parseInt(z);
                mapzoom.G(o.cposid).innerHTML = '<span>x:' + x + '% y:' + y + '% z:' + z + '%<\/span>'
            }
            return false
        }, _showLatLon: function (e) {
            if (cvi_mzactive != null) {
                function parseDMS(v, n) {
                    var d, m, s;
                    d = parseInt(v);
                    m = Math.abs(parseFloat(v - d) * 60);
                    s = Math.abs(parseFloat(parseInt(m) - m) * 60);
                    return Math.abs(d) + "°" + parseInt(m) + "'" + parseInt(s) + "'' " + n
                };
                var k, t, x, y, lat, lon, ex, ey, px = 0,
                    py = 0,
                    o = mapzoom.G(cvi_mzactive),
                    w = o.parentNode.width,
                    h = o.parentNode.height;
                e = e ? e : window.event;
                ex = e.clientX;
                ey = e.clientY;
                if (e.pageX || e.pageY) {
                    px = e.pageX;
                    py = e.pageY
                }
                k = mapzoom._getMousePos(ex, ey, px, py);
                t = mapzoom._findPosXY(o);
                x = Math.min(Math.max(k.ex + k.ox - t.x, 0), w);
                y = Math.min(Math.max(k.ey + k.oy - t.y, 0), h);
                lat = parseFloat(90 - ((y + ((h * o.chf) * o.cyf)) * 180 / (h * o.chf)));
                lon = parseFloat(((x + ((w * o.cwf) * o.cxf)) * 360 / (w * o.cwf)) - 180);
                lon = parseDMS(lon, lon != 0 ? (lon < 0 ? "W" : "E") : "");
                lat = parseDMS(lat, lat != 0 ? (lat < 0 ? "S" : "N") : "");
                mapzoom.G(o.cposid).innerHTML = '<span>Lat: ' + lat + ' &bull; Lon: ' + lon + '<\/span>'
            }
            return false
        }, _killTooltip: function (id) {
            var ison, img = mapzoom.G(id);
            ison = mapzoom.G(img.ttipid);
            if (ison) {
                document.getElementsByTagName("body")[0].removeChild(ison)
            }
            return false
        }, _showTooltip: function (id, xx, yy) {
            xx = xx || 0;
            yy = yy || 0;
            var over, view, img = mapzoom.G(id),
                ison = mapzoom.G(img.ttipid);
            if (!ison) {
                var t = mapzoom._findPosXY(img.parentNode.parentNode);
                over = mapzoom.E('div');
                if (img.trident) {
                    over.style.backgroundColor = 'black'
                }
                over.id = img.ttipid;
                over.style.height = 'auto';
                over.style.width = 'auto';
                over.style.display = 'block';
                over.style.position = 'absolute';
                over.style.filter = "alpha(opacity=0)";
                over.style.opacity = 0;
                over.style.left = (t.x + 10 + xx) + 'px';
                over.style.top = (t.y + yy) + 'px';
                over.style.visibility = 'visible';
                over.style.border = 'solid 2px white';
                over.style.MozBorderRadius = over.style.KhtmlBorderRadius = over.style.WebkitBorderRadius = over.style.borderRadius = '6px';
                over.unselectable = "on";
                over.style.MozBoxShadow = over.style.WebkitBoxShadow = over.style.KhtmlBoxShadow = over.style.boxShadow = '0px 0px 8px black';
                over.style.MozUserSelect = over.style.KhtmlUserSelect = "none";
                document.getElementsByTagName("body")[0].appendChild(over);
                over.onclick = function () {
                    document.getElementsByTagName("body")[0].removeChild(this)
                };
                if (!img.trident) {
                    view = mapzoom.E('div');
                    view.style.height = '100%';
                    view.style.width = '100%';
                    view.style.left = '0px';
                    view.style.top = '0px';
                    view.style.position = 'absolute';
                    view.style.opacity = 0.5;
                    view.style.backgroundColor = 'black';
                    view.style.MozBorderRadius = view.style.KhtmlBorderRadius = view.style.WebkitBorderRadius = view.style.borderRadius = '4px';
                    over.appendChild(view)
                }
                view = mapzoom.E('div');
                view.style.display = 'block';
                view.style.left = '0px';
                view.style.top = '0px';
                view.style.position = 'relative';
                view.style.textAlign = 'left';
                view.style.verticalAlign = 'middle';
                view.style.color = 'white';
                view.style.fontSize = '12px';
                view.style.fontFamily = 'Arial,Helvetica,sans-serif';
                view.style.fontStyle = 'normal';
                view.style.fontWeight = 'bold';
                view.style.whiteSpace = 'nowrap';
                view.style.textShadow = 'black 0px 0px 4px';
                view.style.margin = '10px';
                view.innerHTML = img.infoblock;
                over.appendChild(view);
                if (img.timer) {
                    window.clearInterval(img.timer)
                }
                var q = 0,
                    c = 0,
                    t = 5,
                    k = 20;
                img.timer = window.setInterval(function () {
                    q += k;
                    over.style.filter = "alpha(opacity=" + q + ")";
                    over.style.opacity = q / 100;
                    c++;
                    if (c > t) {
                        window.clearInterval(img.timer);
                        over.style.filter = "alpha(opacity=100)";
                        over.style.opacity = 1
                    }
                }, 30)
            }
            return false
        }, _setCursor: function (ele, d, id, nop) {
            var img = mapzoom.G(id);
            if (!img.nozoom) {
                var butt = mapzoom.G(d == 1 ? img.zoutid : img.zoinid).style;
                img.zoomin = false;
                img.zoomout = false;
                if (!nop) {
                    ele.style.border = img.bc;
                    ele.style.borderBottom = img.dc;
                    ele.style.borderRight = img.dc;
                    butt.border = img.bc;
                    butt.borderBottom = img.dc;
                    butt.borderRight = img.dc
                }
                if (d == 1 && (parseInt(img.parentNode.style.width, 10) < img.maxwidth || parseInt(img.parentNode.style.height, 10) < img.maxheight)) {
                    if (!nop) {
                        ele.style.border = img.bc;
                        ele.style.borderTop = img.dc;
                        ele.style.borderLeft = img.dc
                    }
                    img.zoomin = true;
                    if (img.gecko) {
                        img.style.cursor = "-moz-zoom-in"
                    } else if (img.webkit) {
                        img.style.cursor = "-webkit-zoom-in"
                    } else if (img.trident || img.chakra) {
                        img.style.cursor = "url('" + img.curpath + "zoom-in.cur'),crosshair"
                    } else {
                        img.style.cursor = "crosshair"
                    }
                } else if (d == 0 && (parseInt(img.parentNode.style.width, 10) > img.minwidth || parseInt(img.parentNode.style.height, 10) > img.minheight)) {
                    if (!nop) {
                        ele.style.border = img.bc;
                        ele.style.borderTop = img.dc;
                        ele.style.borderLeft = img.dc
                    }
                    img.zoomout = true;
                    if (img.gecko) {
                        img.style.cursor = "-moz-zoom-out"
                    } else if (img.webkit) {
                        img.style.cursor = "-webkit-zoom-out"
                    } else if (img.trident || img.chakra) {
                        img.style.cursor = "url('" + img.curpath + "zoom-out.cur'),crosshair"
                    } else {
                        img.style.cursor = "crosshair"
                    }
                } else {
                    img.style.cursor = img.pointer
                }
            }
            return false
        }, _zoomIn: function (id, ct, st, sw, ew, sh, eh, sx, ex, sy, ey, nz) {
            if (!nz) {
                var mw, mh, mx, my, obj = mapzoom.G(id);
                if (parseInt(obj.parentNode.style.width, 10) < obj.maxwidth || parseInt(obj.parentNode.style.height, 10) < obj.maxheight) {
                    clearInterval(cvi_mztimer);
                    mw = Math.max(obj.minwidth, Math.min(obj.maxwidth, Math.round(ew * ct / st + sw)));
                    mx = Math.round(ex * ct / st + sx);
                    mh = Math.max(obj.minheight, Math.min(obj.maxheight, Math.round(eh * ct / st + sh)));
                    my = Math.round(ey * ct / st + sy);
                    obj.parentNode.style.width = mw + 'px';
                    obj.parentNode.style.height = mh + 'px';
                    obj.parentNode.style.left = mx + 'px';
                    obj.parentNode.style.top = my + 'px';
                    ct++;
                    if (obj.divbug) {
                        obj.parentNode.firstChild.style.width = mw + 'px';
                        obj.parentNode.firstChild.style.height = mh + 'px'
                    }
                    mapzoom.G(obj.textid).innerHTML = parseInt((mw / obj.minwidth) * 100) + " / " + parseInt(obj.xfactor * 100) + " %";
                    if (obj.vml && obj.plo.length > 0) {
                        var i, f, p, ele;
                        for (i = 0; i < obj.plo.length; i++) {
                            ele = mapzoom.G(obj.plo[i]);
                            f = parseFloat(mw / obj.minwidth), p = (ele.vbv * f);
                            ele.vbw = p;
                            ele.firstChild.weight = ele.vbw + 'px'
                        }
                    }
                    cvi_mztimer = setInterval("mapzoom._zoomIn('" + id + "'," + ct + "," + st + "," + sw + "," + ew + "," + sh + "," + eh + "," + sx + "," + ex + "," + sy + "," + ey + "," + nz + ")", obj.millisec)
                } else {
                    clearInterval(cvi_mztimer)
                }
            }
            return false
        }, _zoomOut: function (id, rm, ct, st, sw, ew, sh, eh, sx, ex, sy, ey, nz) {
            if (!nz) {
                var mw, mh, mx, my, obj = mapzoom.G(id);
                if (parseInt(obj.parentNode.style.width, 10) > obj.minwidth || parseInt(obj.parentNode.style.height, 10) > obj.minheight) {
                    clearInterval(cvi_mztimer);
                    mw = Math.max(obj.minwidth, Math.min(obj.maxwidth, Math.round(ew * ct / st + sw)));
                    mx = Math.round(ex * ct / st + sx);
                    mh = Math.max(obj.minheight, Math.min(obj.maxheight, Math.round(eh * ct / st + sh)));
                    my = Math.round(ey * ct / st + sy);
                    obj.parentNode.style.width = mw + 'px';
                    obj.parentNode.style.height = mh + 'px';
                    obj.parentNode.style.left = mx + 'px';
                    obj.parentNode.style.top = my + 'px';
                    ct++;
                    if (obj.divbug) {
                        obj.parentNode.firstChild.style.width = mw + 'px';
                        obj.parentNode.firstChild.style.height = mh + 'px'
                    }
                    mapzoom.G(obj.textid).innerHTML = parseInt((mw / obj.minwidth) * 100) + " / " + parseInt(obj.xfactor * 100) + " %";
                    if (obj.vml && obj.plo.length > 0) {
                        var i, f, p, ele;
                        for (i = 0; i < obj.plo.length; i++) {
                            ele = mapzoom.G(obj.plo[i]);
                            f = parseFloat(mw / obj.minwidth), p = (ele.vbv * f);
                            ele.vbw = p;
                            ele.firstChild.weight = ele.vbw + 'px'
                        }
                    }
                    cvi_mztimer = setInterval("mapzoom._zoomOut('" + id + "'," + rm + "," + ct + "," + st + "," + sw + "," + ew + "," + sh + "," + eh + "," + sx + "," + ex + "," + sy + "," + ey + "," + nz + ")", obj.millisec)
                } else {
                    clearInterval(cvi_mztimer);
                    if (obj.webkit && rm) {
                        mapzoom._stopZoom()
                    }
                }
            }
            return false
        }, _stopZoom: function () {
            var view, butt, img = mapzoom._mapzoom;
            document.onmouseup = null;
            clearInterval(cvi_mztimer);
            img.zoomin = false;
            img.zoomout = false;
            img.parentNode.left = parseInt(img.parentNode.style.left, 10);
            img.parentNode.top = parseInt(img.parentNode.style.top, 10);
            img.parentNode.width = parseInt(img.parentNode.style.width, 10);
            img.parentNode.height = parseInt(img.parentNode.style.height, 10);
            img.maxleft = img.parentNode.width - img.minwidth;
            img.maxtop = img.parentNode.height - img.minheight;
            if (img.parentNode.width > img.minwidth || img.parentNode.height > img.minheight) {
                if (img.trident) {
                    img.style.cursor = "url('" + img.curpath + "grab.cur'),move"
                } else {
                    img.style.cursor = "move"
                } if (img.overview) {
                    mapzoom._setOverview(img);
                    mapzoom.G(img.overid).style.visibility = "visible"
                }
            } else {
                img.style.cursor = "crosshair";
                if (img.overview) {
                    mapzoom.G(img.overid).style.visibility = "hidden"
                }
            }
            butt = mapzoom.G(img.zoinid).style;
            butt.border = img.bc;
            butt.borderBottom = img.dc;
            butt.borderRight = img.dc;
            butt = mapzoom.G(img.zoutid).style;
            butt.border = img.bc;
            butt.borderBottom = img.dc;
            butt.borderRight = img.dc;
            img.pointer = img.style.cursor;
            mapzoom.G(img.textid).innerHTML = parseInt((img.parentNode.width / img.minwidth) * 100) + " / " + parseInt(img.xfactor * 100) + " %";
            if (img.lowres && img.highres) {
                mapzoom.source(img, img.highres, false, true)
            }
            cvi_mztimer = setInterval("mapzoom._fadeInfo('" + img.id + "',100)", 30);
            mapzoom._mapzoom = null;
            return false
        }, _catchDrag: function (e) {
            return false
        }, _catchWheel: function (e) {
            var d, p, n, v = 0;
            e = e ? e : window.event;
            if (e.wheelDelta) {
                v = e.wheelDelta / 120
            } else if (e.detail) {
                v = -e.detail / 3
            }
            if (e.preventDefault) {
                e.preventDefault()
            } else {
                e.returnValue = false
            } if (cvi_mzactive != null && v != 0) {
                cvi_mzimage = true;
                var img = mapzoom.G(cvi_mzactive),
                    obj = mapzoom.G(img.infoid).style;
                if (!img.nozoom) {
                    d = img.invert ? (v < 0 ? 0 : 1) : (v < 0 ? 1 : 0);
                    obj.visibility = 'visible';
                    obj.opacity = 1;
                    p = mapzoom.get(img, 'currentxyz');
                    if (p.z <= 0) {
                        p.x = 50;
                        p.y = 50
                    }
                    mapzoom.G(img.textid).innerHTML = parseInt((img.parentNode.width / img.minwidth) * 100) + " / " + parseInt(img.xfactor * 100) + " %";
                    n = d < 1 ? Math.max(p.z - img.speed, 0) : Math.min(p.z + img.speed, 100);
                    mapzoom.kenburns(img, [p.x, p.y, n, 3, false, false, 'cvi_mzclback']);
                    mapzoom.G(img.textid).innerHTML = parseInt((img.parentNode.width / img.minwidth) * 100) + " / " + parseInt(img.xfactor * 100) + " %";
                    mapzoom._fadeInfo(img.id, 100)
                }
            }
            return false
        }, _catchOver: function (e) {
            cvi_mzactive = this.id;
            this.focus();
            if (!this.nozoom) {
                if (this.gecko) {
                    window.addEventListener('DOMMouseScroll', mapzoom._catchWheel, false)
                } else {
                    window.onmousewheel = document.onmousewheel = mapzoom._catchWheel
                }
            }
            document.onkeydown = mapzoom._downKey;
            document.onkeypress = mapzoom._pressKey;
            document.onkeyup = mapzoom._upKey;
            return false
        }, _catchOut: function () {
            cvi_mzactive = null;
            if (!this.nozoom) {
                if (this.gecko) {
                    window.removeEventListener('DOMMouseScroll', mapzoom._catchWheel, false)
                } else {
                    window.onmousewheel = document.onmousewheel = null
                }
            }
            document.onkeydown = null;
            document.onkeypress = null;
            document.onkeyup = null;
            return false
        }, _switchOver: function (e) {
            if (window.XMLHttpRequest) {
                this.firstChild.src = this.firstChild.secnd;
                return false
            } else {
                this.firstChild.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.firstChild.secnd + "',sizingMethod='scale')"
            }
            return false
        }, _switchOut: function (e) {
            if (window.XMLHttpRequest) {
                this.firstChild.src = this.firstChild.first;
                return false
            } else {
                this.firstChild.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.firstChild.first + "',sizingMethod='scale')"
            }
            return false
        }, _catchKey: function (e) {
            clearInterval(cvi_mztimer);
            var img = mapzoom._mapzoom = this;
            var rm = false,
                mm = false,
                k, t, ex, ey, px = 0,
                py = 0,
                obj = mapzoom.G(img.infoid).style;
            e = e ? e : window.event;
            if (e.which) {
                mm = (e.which == 2);
                rm = (e.which == 3)
            } else if (e.button) {
                mm = (e.button == 4);
                rm = (e.button == 2)
            }
            if (img.trident) {
                obj.filter = "alpha(opacity=100)"
            } else {
                obj.opacity = 1
            }
            obj.visibility = 'hidden';
            ex = e.clientX;
            ey = e.clientY;
            if (e.pageX || e.pageY) {
                px = e.pageX;
                py = e.pageY
            }
            k = mapzoom._getMousePos(ex, ey, px, py);
            t = mapzoom._findPosXY(img.parentNode.parentNode);
            img.mouseX = Math.min(Math.max(k.ex + k.ox - t.x, 0), img.minwidth);
            img.mouseY = Math.min(Math.max(k.ey + k.oy - t.y, 0), img.minheight);
            if (((e.altKey && !e.shiftKey) || rm || img.zoomout) && !img.automode && !img.nozoom && (img.parentNode.width > img.minwidth || img.parentNode.height > img.minheight)) {
                var butt, sw, ew, sh, eh, sx, ex, sy, ey, st;
                if (img.gecko) {
                    img.style.cursor = "-moz-zoom-out"
                } else if (img.webkit) {
                    img.style.cursor = "-webkit-zoom-out"
                } else if (img.trident || img.chakra) {
                    img.style.cursor = "url('" + img.curpath + "zoom-out.cur'),crosshair"
                } else {
                    img.style.cursor = "crosshair"
                }
                img.pointer = img.style.cursor;
                if (!img.zoomout) {
                    butt = mapzoom.G(img.zoutid).style;
                    butt.border = img.bc;
                    butt.borderLeft = img.dc;
                    butt.borderTop = img.dc;
                    img.zoomout = true
                }
                sw = img.parentNode.width;
                ew = (img.parentNode.width - img.minwidth) * -1;
                sh = img.parentNode.height;
                eh = (img.parentNode.height - img.minheight) * -1;
                sx = parseInt(img.parentNode.style.left, 10);
                ex = sx * -1;
                sy = parseInt(img.parentNode.style.top, 10);
                ey = sy * -1;
                st = Math.max(1, Math.round((img.parentNode.width / img.minwidth) * 3));
                document.onmouseup = mapzoom._stopZoom;
                obj.visibility = 'visible';
                if (img.lowres && img.highres) {
                    mapzoom.source(img, img.lowres, false, true)
                }
                cvi_mztimer = setInterval("mapzoom._zoomOut('" + img.id + "'," + rm + "," + (img.webkit && rm ? 1 : 0) + "," + st + "," + sw + "," + ew + "," + sh + "," + eh + "," + sx + "," + ex + "," + sy + "," + ey + "," + img.nozoom + ")", img.millisec)
            } else if (((!e.altKey && e.shiftKey) || mm || img.zoomin) && !img.automode && !img.nozoom && (img.parentNode.width < img.maxwidth || img.parentNode.height < img.maxheight)) {
                var butt, sw, ew, sh, eh, sx, ex, sy, ey, st;
                if (img.gecko) {
                    img.style.cursor = "-moz-zoom-in"
                } else if (img.webkit) {
                    img.style.cursor = "-webkit-zoom-in"
                } else if (img.trident || img.chakra) {
                    img.style.cursor = "url('" + img.curpath + "zoom-in.cur'),crosshair"
                } else {
                    img.style.cursor = "crosshair"
                }
                img.pointer = img.style.cursor;
                if (!img.zoomin) {
                    butt = mapzoom.G(img.zoinid).style;
                    butt.border = img.bc;
                    butt.borderLeft = img.dc;
                    butt.borderTop = img.dc;
                    img.zoomin = true
                }
                sw = img.parentNode.width;
                ew = img.maxwidth - img.parentNode.width;
                sh = img.parentNode.height;
                eh = img.maxheight - img.parentNode.height;
                sx = parseInt(img.parentNode.style.left, 10);
                sy = parseInt(img.parentNode.style.top, 10);
                ex = Math.max(0, Math.min(ew, Math.round(((img.mouseX - sx) * (img.maxwidth / img.parentNode.width)) - (img.minwidth * 0.5) + sx))) * -1;
                ey = Math.max(0, Math.min(eh, Math.round(((img.mouseY - sy) * (img.maxheight / img.parentNode.height)) - (img.minheight * 0.5) + sy))) * -1;
                st = Math.max(1, Math.round((img.maxwidth / img.parentNode.width) * 3));
                document.onmouseup = mapzoom._stopZoom;
                obj.visibility = 'visible';
                if (img.lowres && img.highres) {
                    mapzoom.source(img, img.lowres, false, true)
                }
                cvi_mztimer = setInterval("mapzoom._zoomIn('" + img.id + "',0," + st + "," + sw + "," + ew + "," + sh + "," + eh + "," + sx + "," + ex + "," + sy + "," + ey + "," + img.nozoom + ")", img.millisec)
            } else if (img.parentNode.width > img.minwidth || img.parentNode.height > img.minheight) {
                if (img.automode) {
                    mapzoom.stop(img)
                }
                if (img.gecko) {
                    img.style.cursor = "-moz-grabbing"
                } else if (img.trident) {
                    img.style.cursor = "url('" + img.curpath + "grabbing.cur'),move"
                } else {
                    img.style.cursor = "move"
                }
                var x = parseInt(img.parentNode.style.left, 10),
                    y = parseInt(img.parentNode.style.top, 10);
                img.mouseX = e.clientX;
                img.mouseY = e.clientY;
                document.onmousemove = mapzoom._whilePan;
                document.onmouseup = mapzoom._stopPan
            }
            return false
        }, _catchTouch: function (e) {
            if (e.touches.length == 1) {
                e.preventDefault();
                clearInterval(cvi_mztimer);
                var img = mapzoom._mapzoom = e.target;
                if (img && typeof (img.ctrlid) === "string") {
                    cvi_mztimer = new Date().getTime();
                    cvi_mzactive = img.id;
                    cvi_mzimage = true;
                    var delay = cvi_mztimer - img.lasttap;
                    if (delay < 500 && delay > 0) {
                        img.lasttap = 0;
                        var p = mapzoom.get(img, 'currentxyz');
                        if (p.z <= 0) {
                            p.x = 50;
                            p.y = 50
                        }
                        mapzoom.kenburns(img, [p.x, p.y, (p.z < 100 ? 100 : 0), 3])
                    } else {
                        var k, t, ex, ey, px = 0,
                            py = 0,
                            obj = mapzoom.G(img.infoid).style;
                        obj.opacity = 1;
                        obj.visibility = 'hidden';
                        img.lasttap = cvi_mztimer;
                        ex = e.touches[0].clientX;
                        ey = e.touches[0].clientY;
                        if (e.touches[0].pageX || e.touches[0].pageY) {
                            px = e.touches[0].pageX;
                            py = e.touches[0].pageY
                        }
                        k = mapzoom._getMousePos(ex, ey, px, py);
                        t = mapzoom._findPosXY(img.parentNode.parentNode);
                        img.mouseX = Math.min(Math.max(k.ex + k.ox - t.x, 0), img.minwidth);
                        img.mouseY = Math.min(Math.max(k.ey + k.oy - t.y, 0), img.minheight);
                        if (img.parentNode.width > img.minwidth || img.parentNode.height > img.minheight) {
                            if (img.automode) {
                                mapzoom.stop(img)
                            }
                            img.hasmoved = false;
                            img.mouseX = e.touches[0].clientX;
                            img.mouseY = e.touches[0].clientY;
                            img.ontouchmove = mapzoom._touchMove;
                            img.ontouchend = mapzoom._touchEnd
                        }
                    }
                }
            }
            return false
        }, _touchMove: function (e) {
            if (e.touches.length == 1) {
                var img = mapzoom._mapzoom;
                if (img && typeof (img.ctrlid) === "string") {
                    var x = Math.max(0, Math.min(img.maxleft, Math.abs(parseInt(img.parentNode.style.left, 10)) - (e.touches[0].clientX - img.mouseX)));
                    var y = Math.max(0, Math.min(img.maxtop, Math.abs(parseInt(img.parentNode.style.top, 10)) - (e.touches[0].clientY - img.mouseY)));
                    img.parentNode.style.left = (x * -1) + 'px';
                    img.parentNode.style.top = (y * -1) + 'px';
                    img.parentNode.left = (x * -1);
                    img.parentNode.top = (y * -1);
                    img.mouseX = e.touches[0].clientX;
                    img.mouseY = e.touches[0].clientY;
                    img.hasmoved = true
                }
            }
            return false
        }, _touchEnd: function () {
            var img = mapzoom._mapzoom;
            if (img && typeof (img.ctrlid) === "string") {
                clearInterval(cvi_mztimer);
                img.ontouchmove = null;
                img.ontouchend = null;
                if (img.overview) {
                    var view = mapzoom.G(img.viewid).style;
                    view.left = Math.round((Math.abs(parseInt(img.parentNode.style.left, 10)) / (img.parentNode.width / img.minwidth)) * img.ovsfact) - (img.bmode ? 2 : 0) + 'px';
                    view.top = Math.round((Math.abs(parseInt(img.parentNode.style.top, 10)) / (img.parentNode.height / img.minheight)) * img.ovsfact) - (img.bmode ? 2 : 0) + 'px'
                }
            }
            cvi_mzactive = null;
            cvi_mzimage = false;
            mapzoom._mapzoom = null;
            return false
        }, _catchGesture: function (e) {
            e.preventDefault();
            clearInterval(cvi_mztimer);
            var img = mapzoom._mapzoom = e.target;
            if (img && typeof (img.ctrlid) === "string" && !img.zoomin && !img.zoomout && !img.automode && !img.nozoom) {
                cvi_mzactive = img.id;
                cvi_mzimage = true;
                var obj = mapzoom.G(img.infoid).style;
                obj.visibility = 'hidden';
                obj.opacity = 1;
                obj.visibility = 'visible';
                mapzoom.G(img.textid).innerHTML = parseInt((img.parentNode.width / img.minwidth) * 100) + " / " + parseInt(img.xfactor * 100) + " %";
                img.ongesturechange = mapzoom._gestureChange;
                img.ongestureend = mapzoom._gestureEnd
            }
            return false
        }, _gestureChange: function (e) {
            e.preventDefault();
            var img = mapzoom._mapzoom;
            if (img && typeof (img.ctrlid) === "string") {
                var n, obj = mapzoom.G(img.infoid).style,
                    p = mapzoom.get(img, 'currentxyz');
                if (p.z <= 0) {
                    p.x = 50;
                    p.y = 50
                }
                obj.visibility = 'visible';
                obj.opacity = 1;
                mapzoom.G(img.textid).innerHTML = parseInt((img.parentNode.width / img.minwidth) * 100) + " / " + parseInt(img.xfactor * 100) + " %";
                n = e.scale < 1 ? Math.max(p.z - 33.333333, 0) : Math.min(p.z + 33.333333, 100);
                mapzoom.kenburns(img, [p.x, p.y, n, 3]);
                mapzoom.G(img.textid).innerHTML = parseInt((img.parentNode.width / img.minwidth) * 100) + " / " + parseInt(img.xfactor * 100) + " %"
            }
            return false
        }, _gestureEnd: function () {
            var img = mapzoom._mapzoom;
            if (img && typeof (img.ctrlid) === "string") {
                img.ongesturechange = null;
                img.ongestureend = null;
                clearInterval(cvi_mztimer);
                img.zoomin = false;
                img.zoomout = false;
                img.parentNode.left = parseInt(img.parentNode.style.left, 10);
                img.parentNode.top = parseInt(img.parentNode.style.top, 10);
                img.parentNode.width = parseInt(img.parentNode.style.width, 10);
                img.parentNode.height = parseInt(img.parentNode.style.height, 10);
                img.maxleft = img.parentNode.width - img.minwidth;
                img.maxtop = img.parentNode.height - img.minheight;
                mapzoom.G(img.textid).innerHTML = parseInt((img.parentNode.width / img.minwidth) * 100) + " / " + parseInt(img.xfactor * 100) + " %";
                if (img.lowres && img.highres) {
                    mapzoom.source(img, img.highres, false, true)
                }
                mapzoom._fadeInfo(img.id, 100)
            }
            cvi_mzactive = null;
            cvi_mzimage = false;
            mapzoom._mapzoom = null;
            return false
        }, _downKey: function (e) {
            if (cvi_mzactive != null) {
                e = e ? e : window.event;
                var k = (e.keyCode ? e.keyCode : e.which),
                    s = e.shiftKey,
                    a = e.altKey,
                    w = false,
                    AL = 37,
                    AU = 38,
                    AR = 39,
                    AD = 40,
                    HO = 36,
                    EN = 35,
                    PD = 34,
                    PU = 33,
                    PL = 187,
                    MN = 189;
                switch (k) {
                case AL:
                    cvi_mzimage = true;
                    mapzoom._panKey(8, 0, s, a);
                    break;
                case AR:
                    cvi_mzimage = true;
                    mapzoom._panKey(-8, 0, s, a);
                    break;
                case AU:
                    cvi_mzimage = true;
                    mapzoom._panKey(0, 8, s, a);
                    break;
                case AD:
                    cvi_mzimage = true;
                    mapzoom._panKey(0, -8, s, a);
                    break;
                case HO:
                    if (cvi_mzimage == null) {
                        cvi_mzimage = true;
                        mapzoom._initZoom(0, 1, w)
                    }
                    break;
                case EN:
                    if (cvi_mzimage == null) {
                        cvi_mzimage = true;
                        mapzoom._initZoom(1, 1, w)
                    }
                    break;
                case MN:
                case PU:
                    if (cvi_mzimage == null) {
                        cvi_mzimage = true;
                        mapzoom._initZoom(0, 4, w)
                    }
                    break;
                case PL:
                case PD:
                    if (cvi_mzimage == null) {
                        cvi_mzimage = true;
                        mapzoom._initZoom(1, 4, w)
                    }
                    break
                }
            }
            return false
        }, _pressKey: function (e) {
            return false
        }, _upKey: function () {
            if (cvi_mzactive != null) {
                cvi_mzimage = null
            }
            return false
        }, _initZoom: function (d, v, w) {
            var sw, ew, sh, eh, sx, ex, sy, ey, st, img = mapzoom.G(cvi_mzactive);
            if (img.automode) {
                mapzoom.stop(img)
            }
            if (d == 0 && !img.nozoom && (parseInt(img.parentNode.style.width, 10) > img.minwidth || parseInt(img.parentNode.style.height, 10) > img.minheight)) {
                if (img.gecko) {
                    img.style.cursor = "-moz-zoom-out"
                } else if (img.webkit) {
                    img.style.cursor = "-webkit-zoom-out"
                } else if (img.trident || img.chakra) {
                    img.style.cursor = "url('" + img.curpath + "zoom-out.cur'),crosshair"
                } else {
                    img.style.cursor = "crosshair"
                }
                img.pointer = img.style.cursor;
                sw = img.parentNode.width;
                ew = (img.parentNode.width - img.minwidth) * -1;
                sh = img.parentNode.height;
                eh = (img.parentNode.height - img.minheight) * -1;
                sx = parseInt(img.parentNode.style.left, 10);
                ex = sx * -1;
                sy = parseInt(img.parentNode.style.top, 10);
                ey = sy * -1;
                st = Math.max(1, Math.round((img.parentNode.width / img.minwidth) * v));
                if (img.lowres && img.highres) {
                    mapzoom.source(img, img.lowres, false, true)
                }
                mapzoom._zoomKey(d, (w ? 1 : 0), w, st, sw, ew, sh, eh, sx, ex, sy, ey, img.nozoom)
            } else if (d == 1 && !img.nozoom && (parseInt(img.parentNode.style.width, 10) < img.maxwidth || parseInt(img.parentNode.style.height, 10) < img.maxheight)) {
                if (img.gecko) {
                    img.style.cursor = "-moz-zoom-in"
                } else if (img.webkit) {
                    img.style.cursor = "-webkit-zoom-in"
                } else if (img.trident || img.chakra) {
                    img.style.cursor = "url('" + img.curpath + "zoom-in.cur'),crosshair"
                } else {
                    img.style.cursor = "crosshair"
                }
                img.pointer = img.style.cursor;
                sw = img.parentNode.width;
                ew = img.maxwidth - img.parentNode.width;
                sh = img.parentNode.height;
                eh = img.maxheight - img.parentNode.height;
                sx = parseInt(img.parentNode.style.left, 10);
                sy = parseInt(img.parentNode.style.top, 10);
                ex = Math.max(0, Math.min(ew, Math.round((((img.minwidth / 2) - sx) * (img.maxwidth / img.parentNode.width)) - (img.minwidth * 0.5) + sx))) * -1;
                ey = Math.max(0, Math.min(eh, Math.round((((img.minheight / 2) - sy) * (img.maxheight / img.parentNode.height)) - (img.minheight * 0.5) + sy))) * -1;
                st = Math.max(1, Math.round((img.maxwidth / img.parentNode.width) * v));
                if (img.lowres && img.highres) {
                    mapzoom.source(img, img.lowres, false, true)
                }
                mapzoom._zoomKey(d, (w ? 1 : 0), w, st, sw, ew, sh, eh, sx, ex, sy, ey, img.nozoom)
            }
            return false
        }, _zoomKey: function (d, ct, ww, st, sw, ew, sh, eh, sx, ex, sy, ey, nz) {
            if (cvi_mzactive != null && !nz) {
                var view, mw, mh, mx, my, img = mapzoom.G(cvi_mzactive);
                if (!img.automode && !img.zoomout && !img.zoomin) {
                    function setoverview() {
                        if (img.lowres && img.highres) {
                            mapzoom.source(img, img.highres, false, true)
                        }
                        if (img.parentNode.width > img.minwidth || img.parentNode.height > img.minheight) {
                            if (img.trident) {
                                img.style.cursor = "url('" + img.curpath + "grab.cur'),move"
                            } else {
                                img.style.cursor = "move"
                            } if (img.overview) {
                                mapzoom._setOverview(img);
                                mapzoom.G(img.overid).style.visibility = "visible"
                            }
                        } else {
                            img.style.cursor = "crosshair";
                            if (img.overview) {
                                mapzoom.G(img.overid).style.visibility = "hidden"
                            }
                        }
                        img.pointer = img.style.cursor;
                        mapzoom.G(img.infoid).style.visibility = 'hidden'
                    }
                    if (d == 0 && (parseInt(img.parentNode.style.width, 10) > img.minwidth || parseInt(img.parentNode.style.height, 10) > img.minheight)) {
                        mw = Math.max(img.minwidth, Math.min(img.maxwidth, Math.round(ew * ct / st + sw)));
                        mx = Math.round(ex * ct / st + sx);
                        mh = Math.max(img.minheight, Math.min(img.maxheight, Math.round(eh * ct / st + sh)));
                        my = Math.round(ey * ct / st + sy);
                        img.parentNode.style.width = mw + 'px';
                        img.parentNode.style.height = mh + 'px';
                        img.parentNode.style.left = mx + 'px';
                        img.parentNode.style.top = my + 'px';
                        mapzoom.G(img.infoid).style.visibility = 'visible';
                        mapzoom.G(img.textid).innerHTML = parseInt((mw / img.minwidth) * 100) + " / " + parseInt(img.xfactor * 100) + " %";
                        img.parentNode.width = mw;
                        img.parentNode.height = mh;
                        img.parentNode.left = mx;
                        img.parentNode.top = my;
                        img.maxleft = img.parentNode.width - img.minwidth;
                        img.maxtop = img.parentNode.height - img.minheight;
                        if (img.vml && img.plo.length > 0) {
                            var i, f, p, ele;
                            for (i = 0; i < img.plo.length; i++) {
                                ele = mapzoom.G(img.plo[i]);
                                f = parseFloat(mw / img.minwidth), p = (ele.vbv * f);
                                ele.vbw = p;
                                ele.firstChild.weight = ele.vbw + 'px'
                            }
                        }
                        ct++;
                        if (img.divbug) {
                            img.parentNode.firstChild.style.width = mw + 'px';
                            img.parentNode.firstChild.style.height = mh + 'px'
                        }
                        if ((cvi_mzimage || ww) && (img.parentNode.width > img.minwidth || img.parentNode.height > img.minheight)) {
                            if (!ww) {
                                setTimeout("mapzoom._zoomKey(" + d + "," + ct + "," + ww + "," + st + "," + sw + "," + ew + "," + sh + "," + eh + "," + sx + "," + ex + "," + sy + "," + ey + "," + nz + ")", 50)
                            } else {
                                setoverview();
                                if (cvi_mzactive != null) {
                                    cvi_mzimage = null
                                }
                            }
                        } else {
                            setoverview()
                        }
                    } else if (d == 1 && (parseInt(img.parentNode.style.width, 10) < img.maxwidth || parseInt(img.parentNode.style.height, 10) < img.maxheight)) {
                        mw = Math.max(img.minwidth, Math.min(img.maxwidth, Math.round(ew * ct / st + sw)));
                        mx = Math.round(ex * ct / st + sx);
                        mh = Math.max(img.minheight, Math.min(img.maxheight, Math.round(eh * ct / st + sh)));
                        my = Math.round(ey * ct / st + sy);
                        img.parentNode.style.width = mw + 'px';
                        img.parentNode.style.height = mh + 'px';
                        img.parentNode.style.left = mx + 'px';
                        img.parentNode.style.top = my + 'px';
                        mapzoom.G(img.infoid).style.visibility = 'visible';
                        mapzoom.G(img.textid).innerHTML = parseInt((mw / img.minwidth) * 100) + " / " + parseInt(img.xfactor * 100) + " %";
                        img.parentNode.width = mw;
                        img.parentNode.height = mh;
                        img.parentNode.left = mx;
                        img.parentNode.top = my;
                        img.maxleft = img.parentNode.width - img.minwidth;
                        img.maxtop = img.parentNode.height - img.minheight;
                        if (img.vml && img.plo.length > 0) {
                            var i, f, p, ele;
                            for (i = 0; i < img.plo.length; i++) {
                                ele = mapzoom.G(img.plo[i]);
                                f = parseFloat(mw / img.minwidth), p = (ele.vbv * f);
                                ele.vbw = p;
                                ele.firstChild.weight = ele.vbw + 'px'
                            }
                        }
                        ct++;
                        if (img.divbug) {
                            img.parentNode.firstChild.style.width = mw + 'px';
                            img.parentNode.firstChild.style.height = mh + 'px'
                        }
                        if ((cvi_mzimage || ww) && (img.parentNode.width < img.maxwidth || img.parentNode.height < img.maxheight)) {
                            if (!ww) {
                                setTimeout("mapzoom._zoomKey(" + d + "," + ct + "," + ww + "," + st + "," + sw + "," + ew + "," + sh + "," + eh + "," + sx + "," + ex + "," + sy + "," + ey + "," + nz + ")", 50)
                            } else {
                                setoverview();
                                if (cvi_mzactive != null) {
                                    cvi_mzimage = null
                                }
                            }
                        } else {
                            setoverview()
                        }
                    } else {
                        setoverview()
                    }
                }
            }
            return false
        }, _panKey: function (h, v, s, a) {
            if (cvi_mzactive != null) {
                var img = mapzoom.G(cvi_mzactive);
                if (img.automode) {
                    mapzoom.stop(img)
                }
                if (!img.automode && (img.parentNode.width > img.minwidth || img.parentNode.height > img.minheight)) {
                    var x = Math.max(0, Math.min(img.maxleft, Math.abs(parseInt(img.parentNode.style.left)) - (s ? 4 * h : a ? h / 4 : h)));
                    var y = Math.max(0, Math.min(img.maxtop, Math.abs(parseInt(img.parentNode.style.top)) - (s ? 4 * v : a ? v / 4 : v)));
                    img.parentNode.style.left = (x * -1) + 'px';
                    img.parentNode.style.top = (y * -1) + 'px';
                    img.parentNode.left = (x * -1);
                    img.parentNode.top = (y * -1);
                    if (img.overview) {
                        var view = mapzoom.G(img.viewid).style;
                        view.left = Math.round((Math.abs(parseInt(img.parentNode.style.left)) / (img.parentNode.width / img.minwidth)) * img.ovsfact) - (img.bmode ? 2 : 0) + 'px';
                        view.top = Math.round((Math.abs(parseInt(img.parentNode.style.top)) / (img.parentNode.height / img.minheight)) * img.ovsfact) - (img.bmode ? 2 : 0) + 'px'
                    }
                    if (cvi_mzimage) {
                        setTimeout("mapzoom._panKey(" + h + "," + v + "," + s + "," + a + ")", 50)
                    }
                }
            }
            return false
        }, _fadeImage: function (id, o) {
            var img = mapzoom.G(id);
            if (o <= 100) {
                if (img.trident) {
                    img.parentNode.style.filter = "alpha(opacity=" + o + ")"
                } else {
                    img.parentNode.style.opacity = o / 100
                }
                o += 10;
                window.setTimeout("mapzoom._fadeImage('" + id + "'," + o + ")", 30)
            } else {
                if (img.buttons && !img.tod) {
                    mapzoom.G(img.ctrlid).style.visibility = 'visible'
                }
                if (img.showcoords && !img.tod) {
                    mapzoom.G(img.xycoid).style.visibility = 'visible'
                }
                if (img.special && (img.parentNode.width > img.minwidth || img.parentNode.height > img.minheight)) {
                    img.overview = true;
                    img.special = false;
                    mapzoom._setOverview(img);
                    mapzoom.G(img.overid).style.visibility = "visible"
                }
            }
            return false
        }, _fadeInfo: function (id, o) {
            clearInterval(cvi_mztimer);
            var img = mapzoom.G(id),
                obj = mapzoom.G(img.infoid);
            if (o > 0 && cvi_mzactive == img.id && !img.zoomin && !img.zoomout) {
                if (img.trident) {
                    obj.style.filter = "alpha(opacity=" + o + ")"
                } else {
                    obj.style.opacity = o / 100
                }
                o -= 5;
                cvi_mztimer = setInterval("mapzoom._fadeInfo('" + id + "'," + o + ")", 50)
            } else {
                if (img.trident) {
                    obj.style.filter = "alpha(opacity=100)"
                } else {
                    obj.style.opacity = 1
                }
                obj.style.visibility = 'hidden'
            }
            return false
        }, _fadeOut: function (id, o) {
            var img = mapzoom.G(id);
            if (o > 0) {
                if (img.trident) {
                    img.parentNode.style.filter = "alpha(opacity=" + o + ")"
                } else {
                    img.parentNode.style.opacity = o / 100
                }
                o -= 10;
                window.setTimeout("mapzoom._fadeOut('" + id + "'," + o + ")", 30)
            } else {
                var obj = mapzoom.G(img.xrefid);
                obj.src = mapzoom.G(img.isrcid).src;
                mapzoom.G(img.tumbid).src = obj.src;
                obj.style.msInterpolationMode = img.bicubic;
                mapzoom.G(img.isrcid).src = img.trident ? null : null;
                if (img.highres != obj.src) {
                    img.highres = obj.src
                }
                mapzoom._fadeIn(id, 0)
            }
            return false
        }, _fadeIn: function (id, o) {
            var img = mapzoom.G(id);
            if (o <= 100) {
                if (img.trident) {
                    img.parentNode.style.filter = "alpha(opacity=" + o + ")"
                } else {
                    img.parentNode.style.opacity = o / 100
                }
                o += 10;
                window.setTimeout("mapzoom._fadeIn('" + id + "'," + o + ")", 30)
            } else {
                if (img.buttons && !img.tod) {
                    mapzoom.G(img.ctrlid).style.visibility = "visible"
                }
                if (img.overview && (img.parentNode.width > img.minwidth || img.parentNode.height > img.minheight)) {
                    mapzoom.G(img.overid).style.visibility = "visible"
                }
                if (img.showcoords && !img.tod) {
                    mapzoom.G(img.xycoid).style.visibility = "visible"
                }
            }
            return false
        }, _whilePan: function (e) {
            var img = mapzoom._mapzoom;
            e = e ? e : window.event;
            var x = Math.max(0, Math.min(img.maxleft, Math.abs(parseInt(img.parentNode.style.left)) - (e.clientX - img.mouseX)));
            var y = Math.max(0, Math.min(img.maxtop, Math.abs(parseInt(img.parentNode.style.top)) - (e.clientY - img.mouseY)));
            img.parentNode.style.left = (x * -1) + 'px';
            img.parentNode.style.top = (y * -1) + 'px';
            img.parentNode.left = (x * -1);
            img.parentNode.top = (y * -1);
            img.mouseX = e.clientX;
            img.mouseY = e.clientY;
            return false
        }, _stopPan: function () {
            var view, butt, img = mapzoom._mapzoom;
            document.onmousemove = null;
            document.onmouseup = null;
            if (img.gecko || img.presto) {
                img.style.cursor = "move"
            } else {
                img.style.cursor = img.pointer
            } if (img.overview) {
                view = mapzoom.G(img.viewid).style;
                view.left = Math.round((Math.abs(parseInt(img.parentNode.style.left)) / (img.parentNode.width / img.minwidth)) * img.ovsfact) - (img.bmode ? 2 : 0) + 'px';
                view.top = Math.round((Math.abs(parseInt(img.parentNode.style.top)) / (img.parentNode.height / img.minheight)) * img.ovsfact) - (img.bmode ? 2 : 0) + 'px'
            }
            mapzoom._mapzoom = null;
            return false
        }, _startMove: function (e) {
            if (!e) {
                e = window.event;
                var view = e.srcElement
            } else {
                var view = e.target
            }
            var l = parseInt(view.style.left),
                t = parseInt(view.style.top);
            cvi_mzimage = view.id.substring(0, view.id.indexOf("_"));
            view.style.cursor = "default";
            view.mouseX = e.clientX;
            view.mouseY = e.clientY;
            document.onmousemove = mapzoom._whileMove;
            document.onmouseup = mapzoom._stopMove;
            return false
        }, _whileMove: function (e) {
            if (!e) {
                e = window.event;
                var view = e.srcElement
            } else {
                var view = e.target
            }
            var cen = view.id.split("_"),
                img = mapzoom.G(cvi_mzimage);
            if (view && cen[cen.length - 1] == 'view' && view.maxleft && view.maxtop) {
                var l = Math.max(0, Math.min(view.maxleft, Math.abs(parseInt(view.style.left)) + (e.clientX - view.mouseX)));
                var t = Math.max(0, Math.min(view.maxtop, Math.abs(parseInt(view.style.top)) + (e.clientY - view.mouseY)));
                view.style.left = (l - (img.bmode ? 2 : 0)) + 'px';
                view.style.top = (t - (img.bmode ? 2 : 0)) + 'px';
                view.mouseX = e.clientX;
                view.mouseY = e.clientY;
                var x = Math.max(0, Math.min(img.maxleft, Math.abs(l * (img.parentNode.width / img.minwidth) * (1 / img.ovsfact))));
                var y = Math.max(0, Math.min(img.maxtop, Math.abs(t * (img.parentNode.height / img.minheight) * (1 / img.ovsfact))));
                img.parentNode.style.left = (x * -1) + 'px';
                img.parentNode.style.top = (y * -1) + 'px';
                img.parentNode.left = (x * -1);
                img.parentNode.top = (y * -1)
            } else {
                document.onmousemove = null;
                document.onmouseup = null;
                if (img) {
                    img.onmousedown = mapzoom._catchKey
                }
                cvi_mzimage = null
            }
            return false
        }, _stopMove: function () {
            document.onmousemove = null;
            document.onmouseup = null;
            mapzoom.G(cvi_mzimage).onmousedown = mapzoom._catchKey;
            cvi_mzimage = null;
            return false
        }
    }

    